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