| | |
help me about save and not save text file
![]() |
•
•
Join Date: Jul 2007
Posts: 35
Reputation:
Solved Threads: 0
hi .... im having trouble about how to not save text file...
'i create a textfile like this ..'
Set ts2 = fs.CreateTextFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
vsmg = "my text"
ts2.writeline (vsmg)
'call a notepad'
Call Shell("notepad.exe " & (vtxt & "_" & Format(Date, "ddmmyy") & ".txt"), vbNormalFocus)
ok here goes my problem , I want to false the below function but it showed me an error ..... In the other word, I dont wanna my Notepad which contain no error is being saved but ..... pls help me....
If lbl1.Caption = "NoError" Then Set ts2 = fs.CreateTextFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt") = False
'i create a textfile like this ..'
Set ts2 = fs.CreateTextFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
vsmg = "my text"
ts2.writeline (vsmg)
'call a notepad'
Call Shell("notepad.exe " & (vtxt & "_" & Format(Date, "ddmmyy") & ".txt"), vbNormalFocus)
ok here goes my problem , I want to false the below function but it showed me an error ..... In the other word, I dont wanna my Notepad which contain no error is being saved but ..... pls help me....
If lbl1.Caption = "NoError" Then Set ts2 = fs.CreateTextFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt") = False
•
•
Join Date: Jul 2007
Posts: 35
Reputation:
Solved Threads: 0
that's the things , how to come out from the creation procedure ? is it easier for me to delete the files that has been created ?
Set ts2 = fs.CreateTextFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
If lbl1.Caption = "No error" Then Set ts2 = fs.DeleteFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
there is an error showing Expected funciton or vairable ..... at fs.DeleteFile . i dont know why ... can u please explain it to me?
Set ts2 = fs.CreateTextFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
If lbl1.Caption = "No error" Then Set ts2 = fs.DeleteFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
there is an error showing Expected funciton or vairable ..... at fs.DeleteFile . i dont know why ... can u please explain it to me?
Hi,
u need not set it to something ts2, just delete it:
There is another way to delete file:
REgards
Veena
u need not set it to something ts2, just delete it:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
fs.DeleteFile(vtxt & "_" & Format(Date, "ddmmyy") & ".txt")
There is another way to delete file:
Kill (vtxt & "_" & Format(Date, "ddmmyy") & ".txt")REgards
Veena
![]() |
Similar Threads
- Cant readline in text file.... URGENT help~ (VB.NET)
- How to save all search engine results urls in a text file (C)
- save ARRay elements to a file (C++)
- Java multiple text file saving (Java)
- Problems of looping in saving to a text file (C)
- Save a text file in an csv.file with ascii? (PHP)
- IE6 (file/save as) does not save pages correctly on my local disk (Web Browsers)
- Read and write to an ASCII Text file (Java)
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Using timer in Class
- Next Thread: Multiline in a list box
Views: 2432 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Visual Basic 4 / 5 / 6
* 6 access activex add ado application banned basic beep bmp box c++ calculator click client code coffeehouse college column convert copy creative database designer desktop dissertations dissertationthesis edit error excel file filter flex form hardware header ide image implements inboxinvb installation installer interaction keypress listview looping machine macro mail match memory messagebox microsoft number open pause pdf picture pos prime print program programmer prompt query random range range-objects readfile registration remotesqlserverdatabase report reports retrieve save score search sites spectateswamp sql string struct subroutine table textbox time timer variable variables vb vb6 vb6.0 vba vista visual visualbasic web window windows





