Sub test()
SetShortcuts True ' disable shortcuts
' SetShortcuts False ' reset shortcuts
End Sub
Sub DummyMacro()
' no code in the macro
MsgBox "DummyMacro" ' just to test
End Sub
Sub SetShortcuts(bDisable As Boolean)
Dim i As Long, j As Long
Dim sMacro As String, sKey As String
Dim vArr
vArr = Array("^", "+^") ' (ctrl, shift-ctrl)
sMacro = "'" & ThisWorkbook.Name & "'!DummyMacro"
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, sMacro
Else
Application.OnKey sKey
End If
Next
Next
End Sub
Assigs ctrl & ctrl+shift a to z to the dummy macro. Adapt if you also want
to include
numbers and the F keys. See OnKey in help
Regards,
Peter T
"Roger" <(E-Mail Removed)> wrote in message
news

1322980-D888-4752-B5C4-(E-Mail Removed)...
> Peter - just the excel ones like ctrl-c copy
>
>
> --
> Roger
>
>
> "Peter T" wrote:
>
> > Do you mean shortcuts assigned to macros or all shortcuts, like ctrl-c
copy,
> > or both..
> >
> > Regards,
> > Peter T
> >
> >
> > "Roger" <(E-Mail Removed)> wrote in message
> > news:AD6CC27C-7B06-4D14-A898-(E-Mail Removed)...
> > > Is ther a way to disable all keyborad shortcuts in a "For Each" or
> > similiar
> > >
> > >
> > > --
> > > Roger
> >
> >
> >