R
Roger
Is ther a way to disable all keyborad shortcuts in a "For Each" or similiar
Peter T said:Actually it seems the Dummy macro is not required at all. Try this -
Sub SetShortcuts(bDisable As Boolean)
Dim i As Long, j As Long
Dim sKey As String
Dim vArr
vArr = Array("^", "+^") ' (ctrl, shift-ctrl)
For i = Asc("a") To Asc("z") ' 97 to 122
For j = 0 To 1
sKey = vArr(j) & Chr(i)
If bDisable Then
Application.OnKey sKey, ""
Else
Application.OnKey sKey
End If
Next
Next
End Sub
Regards,
Peter T