Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a difference between CTRL+D and CTRL+" (quotation marks) AKMMS Excel Discussion (Misc queries) 2 March 22nd 10 07:43 PM
How to make Ctrl-C, ctrl-V work in Office 2007 hj Excel Discussion (Misc queries) 1 June 23rd 09 01:09 PM
Excel 2007: Ctrl+PgUp or Ctrl+PgDn with Protected Sheets DrDave Excel Discussion (Misc queries) 1 July 28th 08 04:12 AM
Ctrl+pgup pgdn can't jump worksheets [email protected] Excel Worksheet Functions 0 August 2nd 06 04:48 PM
Disabling Ctrl, ALT keys turk5555[_4_] Excel Programming 3 December 19th 03 10:52 AM


All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"