Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling Ctrl-PgUp and Ctrl-PgDn
I know how to remove the sheet tabs at Tools, Options, then uncheck Sheet
tabs. But that does not disable the ability to change sheets with Ctrl-PgUp and Ctrl-PgDn. Is there a way to disable that function in Excel? Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling Ctrl-PgUp and Ctrl-PgDn
use the sheet's deactivate event
to reactivate it ? Private Sub Worksheet_Deactivate() Me.Activate End Sub keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool ?B?Sy5BLiBIdWVzdG9u?= <K.A. wrote: I know how to remove the sheet tabs at Tools, Options, then uncheck Sheet tabs. But that does not disable the ability to change sheets with Ctrl-PgUp and Ctrl-PgDn. Is there a way to disable that function in Excel? Thank you |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling Ctrl-PgUp and Ctrl-PgDn
Disable it by assigning it to something else.
private sub thisworkbook_open() application.onkey "^{PGUP}","DummyMacro" application.onkey "^{PGDN}","DummyMacro" end sub public sub DummyMacro end sub K.A. Hueston wrote: I know how to remove the sheet tabs at Tools, Options, then uncheck Sheet tabs. But that does not disable the ability to change sheets with Ctrl-PgUp and Ctrl-PgDn. Is there a way to disable that function in Excel? Thank you |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling Ctrl-PgUp and Ctrl-PgDn
Hi,
I guess you are trying to do that for a specific workbook. You could hide the other sheets: - select the sheet to be hidden - menu Format Sheet Hide And similar to unhide which means the user can still go in menu Format Sheet and see that some sheets are hidden. To prevent the user from seeing the sheets in that menu, in the vba editor, run the following code to hide a sheet, eg here hides Sheet2: Worksheets("sheet2").visible = xlSheetVeryHidden Now the user cannot unhidde it from Excel. For you to unhide the sheet, do: Worksheets("sheet2").visible = xlSheetVisible I hope this helps, Sebastien "K.A. Hueston" wrote: I know how to remove the sheet tabs at Tools, Options, then uncheck Sheet tabs. But that does not disable the ability to change sheets with Ctrl-PgUp and Ctrl-PgDn. Is there a way to disable that function in Excel? Thank you |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a difference between CTRL+D and CTRL+" (quotation marks) | Excel Discussion (Misc queries) | |||
How to make Ctrl-C, ctrl-V work in Office 2007 | Excel Discussion (Misc queries) | |||
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets | Excel Discussion (Misc queries) | |||
Ctrl+pgup pgdn can't jump worksheets | Excel Worksheet Functions | |||
Disabling Ctrl, ALT keys | Excel Programming |