Hello
1- What is the AutoExec Macro? Is it the same thing as AutoKeys Macro?
2- I'm looking to Control Keys equally on startup for my entire app. I
understand that
the AutoKeys Macro is the place to go but it seems that some keys
cannot be
controlled there according to MS Help.
I created a Function in my form module to control my keys, but I
want to call it from
the AutoKeys macro. Will this work? Am I on the right track?
I can't seem to get it to work. I created the AutoKeys macro and put
RunCode for
the action, and ControlKeys() as the function. I put it in the
AutoKeys macro so that
it controls my entire app.
MyCode:
Public Sub Form_Key(KeyCod e As Integer, Shift As Integer)
If (Shift = 6) And (KeyCode = vbKeyF8) Then
'Ctrl-Alt-F8 to open the ErrorLog
MsgBox "Ctrl-Alt-F8"
Else
'Disable choice keyboard keys
Select Case KeyCode
' ShutOff Ctrl, Alt, PgUp, PgDn, F1-F12
Case 17, 18, 33, 34, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123
KeyCode = 0
Case Else
Me.Text6 = KeyCode
' MsgBox KeyCode, vbOKOnly
End Select
End If
End Sub
Public Function ControlKeys()
Call Form_Key
End Function
1- What is the AutoExec Macro? Is it the same thing as AutoKeys Macro?
2- I'm looking to Control Keys equally on startup for my entire app. I
understand that
the AutoKeys Macro is the place to go but it seems that some keys
cannot be
controlled there according to MS Help.
I created a Function in my form module to control my keys, but I
want to call it from
the AutoKeys macro. Will this work? Am I on the right track?
I can't seem to get it to work. I created the AutoKeys macro and put
RunCode for
the action, and ControlKeys() as the function. I put it in the
AutoKeys macro so that
it controls my entire app.
MyCode:
Public Sub Form_Key(KeyCod e As Integer, Shift As Integer)
If (Shift = 6) And (KeyCode = vbKeyF8) Then
'Ctrl-Alt-F8 to open the ErrorLog
MsgBox "Ctrl-Alt-F8"
Else
'Disable choice keyboard keys
Select Case KeyCode
' ShutOff Ctrl, Alt, PgUp, PgDn, F1-F12
Case 17, 18, 33, 34, 112, 113, 114, 115, 116, 117, 118,
119, 120, 121, 122, 123
KeyCode = 0
Case Else
Me.Text6 = KeyCode
' MsgBox KeyCode, vbOKOnly
End Select
End If
End Sub
Public Function ControlKeys()
Call Form_Key
End Function
Comment