作者:
sinlin (豆漿)
2023-04-18 12:50:23想在excel使用keydown功能結果一直沒反應
寫了一個簡單的測試程式對按F鍵反應
結果compile顯示使用者自訂型態尚未定義
請問這該如何解決
Private Sub Worksheet_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal
Shift As Integer)
If KeyCode = vbKeyF Then 'check if the user has pressed the F key
MsgBox "You pressed the F key!" 'display a message box
End If
End Sub