whats up with this?

matrixhacker
05-18-2003, 03:47 AM
hi i am using this code to store data. The user can change where the data is stored. I am using append to create the file if it is not there and output to store the data in the file. there comes up with an errorfile not found. but if i am using append then surely that will create the file, or it has done before :confused:

Private Sub Command4_Click()

Dim x As String
x = Text3.Text
If Len(x) > 0 Then
Open x For Append As #2
Close #2
Open (x) For Output As #1
Print #1, ""
Close #1
ElseIf Len(x) < 1 Then
MsgBox "You have not entered a file path", vbInformation, "txt file"
End If
End Sub

AntiSilence
05-18-2003, 09:32 AM
I tried your code, and it worked ok and didn't give any error messages.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum