View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Vergel Adriano Vergel Adriano is offline
external usenet poster
 
Posts: 857
Default Disable Ctrl- PAGEUP PAGEDWN

Maybe try this in a code module:

Sub DummyProc()
Beep
End Sub

Sub DisableKeys()
Application.OnKey "^{PGUP}", "DummyProc"
Application.OnKey "^{PGDN}", "DummyProc"
End Sub

Sub RestoreKeys()
Application.OnKey "^{PGUP}"
Application.OnKey "^{PGDN}"
End Sub


To disable the ctrl+pgup and ctrl+pgdn call the DisableKeys sub. To get
them back, use the RestoreKeys sub.

--
Hope that helps.

Vergel Adriano


"Boss" wrote:

I wish to disable CTRL-pageup & pagedown so that the user cannot swith
between worsheets. I would even wish to hide the Tools-option-sheettabs, so
that user can only work in his worksheet.

Hope what i am lookingf for.. Thanks a lot for help.
Boss