Christina,
I don’t use 2007 so cannot answer all your questions.
However, following procedure should disable most of the keys on keyboard you
need to isolate but adjust code to suit your need.
The second procedure should restore the keyboard to normal use but be aware;
any assigned keys used as personal shortcuts may be lost.
As always, these things only work with macro’s enabled.
Use with care but hope helpful.
'
'*** Disable Function Keys,
'*** CTRL + most other Keys ...
'*** NB use with care!
Sub DisableKeys()
With Application
'Function Keys
' By themselves ...
For i% = 1 To 12
.OnKey "{f" & i% & "}", "do_nothing"
Next i%
' with Ctrl ...
For i% = 1 To 12
.OnKey "^{f" & i% & "}", "do_nothing"
Next i%
' with Alt ...
For i% = 1 To 12
.OnKey "%{f" & i% & "}", "do_nothing"
Next i%
' and with Shift.
For i% = 1 To 12
.OnKey "+{f" & i% & "}", "do_nothing"
Next i%
' Disable CTRL + most other keys
' NB Caps Lock does not have any
' effect on the action of the keys.
On Error Resume Next
' Some characters seem to cause
' an error when used with OnKey.
For i% = 32 To 122
.OnKey "^" & Chr(i%), "do_nothing"
Next i%
On Error GoTo 0
.OnKey "{ESC}", "do_nothing"
.OnKey "{HELP}", "do_nothing"
' .OnKey "%{TAB}", "do_nothing" 'ALT + TAB
End With
End Sub
Sub do_nothing()
Beep
MsgBox "Function Disabled!"
End Sub
'
'*** Restore normal
'*** keyboard operation.
Sub RestoreKeys()
With Application
'Function Keys
' By themselves ...
For i% = 1 To 12
.OnKey "{f" & i% & "}"
Next i%
' with Ctrl ...
For i% = 1 To 12
.OnKey "^{f" & i% & "}"
Next i%
' with Alt ...
For i% = 1 To 12
.OnKey "%{f" & i% & "}"
Next i%
' and with Shift.
For i% = 1 To 12
.OnKey "+{f" & i% & "}"
Next i%
' Re-enable CTRL + most other keys
On Error Resume Next
For i% = 32 To 122
.OnKey "^" & Chr(i%)
Next i%
On Error GoTo 0
.OnKey "{ESC}"
.OnKey "{HELP}"
' .OnKey "%{TAB}"
End With
End Sub