|
-
Aug 29th, 2000, 09:00 AM
#1
Thread Starter
Addicted Member
I'm not very familiar with NT. Well my boss and I were testing a program before we actually let anyone run it and we found that when we tried to save the .txt would not show up on the file name. Does anyone have any suggestions on to why that happened?
Thank you.
-
Aug 29th, 2000, 09:03 AM
#2
Post your saving routine. Maybe there's are error in it.
-
Aug 29th, 2000, 09:07 AM
#3
Thread Starter
Addicted Member
posted saving routine
Private Sub mnuFileSaveAs_Click()
Dim fname As String
Dim response As VbMsgBoxResult
On Local Error GoTo errhandler
CommonDialog1.CancelError = True
CommonDialog1.Filter = "Text (*.txt)|*.txt|" 'You can add other File Names here
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
fname = CommonDialog1.FileName
If Len(Dir(fname)) > 0 Then
response = MsgBox("File already exists! Do you want to overwrite?", vbYesNo, "File Save As")
If (response = 7) Then
CommonDialog1.CancelError = True
CommonDialog1.Filter = "Text (*.txt)|*.txt|" 'You can add other File Names here
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close #1
End If
End If
errhandler:
Exit Sub
End Sub
-
Aug 29th, 2000, 12:13 PM
#4
Thread Starter
Addicted Member
Yeah I agree with the flags and they work great. Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|