|
-
Feb 26th, 2000, 03:52 PM
#1
Thread Starter
Member
Why won't this code work? It will send the letter to the text file but not the the number?? Please help me. This is killing me!!!
Code:
Private Sub Form_KeyDown(keycode As Integer, Shift As Integer)
If keycode = 90 Then
Dim zFile As Integer
zFile = FreeFile
Open "C:\Log.txt" For Append As zFile
Print #zFile, "z";
Close zFile
End If
End If
If keycode = 48 Then
Dim aaFile As Integer
aaFile = FreeFile
Open "C:\Log.txt" For Append As aaFile
Print #aaFile, "0";
Close aaFile
End If
End Sub
Thanks,
Kevin
-
Feb 27th, 2000, 07:46 AM
#2
New Member
You had an extra end if
Code:
Private Sub Form_KeyDown(keycode As Integer, Shift As Integer)
If keycode = 90 Then
Dim zFile As Integer
zFile = FreeFile
Open "C:\Log.txt" For Append As zFile
Print #zFile, "z";
Close zFile
End If
If keycode = 48 Then
Dim aaFile As Integer
aaFile = FreeFile
Open "C:\Log.txt" For Append As aaFile
Print #aaFile, "0";
Close aaFile
End If
End Sub
-
Feb 27th, 2000, 08:51 AM
#3
Addicted Member
How did you get it so that your post was color coded like VB syntax highlighting?
-
Mar 1st, 2000, 03:14 AM
#4
New Member
By using UBB Code. You can get a list of those code at http://www.vb-world.net/forums/ubbcode.html.
Dynamo
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
|