|
-
Jan 21st, 2000, 05:30 AM
#1
Thread Starter
Lively Member
I have the following code and up till recent changes it would create the file....
the first time through it gives no problems... but it doesn't create a file and when i click the button again all it does is flash and nothing happens....any help?
Dim x As Byte
Dim response As Integer
Dim Filename, typetest As String
Option Explicit
Private Sub cmdcreate_Click()
cdbsave.CancelError = True
On Error GoTo saveerror
cdbsave.Filter = _
"Starcraft triggers (*.trg)|*.trg*"
responseno:
cdbsave.ShowSave
Filename = cdbsave.Filename
typetest = Right$(Filename, 4)
If typetest = ".trg" Then
Else
Filename = Filename & ".trg"
End If
If Dir(Filename) = "" Then
Else
response = MsgBox("The file exists. Do you want to replace it?", 564, "Error: Same name")
If response = 6 Then
ElseIf response = 7 Then GoTo responseno
End If
End If
x = 113
Open Filename For Binary As #1
Put #1, , x
Close #1
saveerror:
End Sub
Thats the entire code
and by the way i hate no idea what "Option Explicit" does i just was told to use it in my vb programing class(a small one in a summer camp i didn't choose to take)
later,
Iceman
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
|