This is what i have done
1. Public Sub Form_Load()
2. KeyPreview = True
3. End Sub
1. Private Sub Form_KeyDown(KeyCodeConstants As Integer, Shift As Integer)
2. KeyPreview = True
3. If KeyCodeConstants = vbKeyF1 Then cmd1_Click
4. If KeyCodeConstants = vbKeyF2 Then cmd2_Click
5. End Sub
When i press F1 or F2, i get an error msg "Compile error : Sub or Function not defined"
Can anyone please help me? Thank you!
i'm using vb 6.0 enterprise edition