• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

disable shortcut key hide sheet tab

kalpeshpatel

New Member
i work in worksheet 1

now i would like to disable shortcut key "ctrl + s" ," ctrl + tab", also hide sheet tab by macro only


how it
 
If you right-click on the Sheet1 tab, click View Code and copy/paste the following:

[pre]
Code:
Sub Test()
Application.MacroOptions Macro:="Sheet1.Test", ShortcutKey:="s"
ActiveWindow.DisplayWorkbookTabs = False

End Sub

Sub UndoTest()
Application.MacroOptions Macro:="Sheet1.Test", ShortcutKey:=""
ActiveWindow.DisplayWorkbookTabs = True

End Sub
[/pre]
This will disable Ctrl-S by overriding the normal shortcut with a shortcut to this macro instead, and will remove the tabs at the bottom. (assuming your sheet is called "Sheet1"). The UndoTest will reset them back to normal if it's run.


As for the Ctrl-Tab, I don't think you can stop that shortcut, but you could simply hide or close all other workbooks. Since it simply moves to the next workbook, if there are none it will appear to do nothing.
 
Back
Top