Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Diactivate shortcut keys

Hi
Thanks in advance.

Is there a way to diactivate the keyboard shortcuts while a specific workbbok
is open, so that if the user press e.g. Ctrl+C it would not work. Thanks.

Regards

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default Diactivate shortcut keys

"Uddinj1" wrote in message
...
Is there a way to diactivate the keyboard shortcuts while a specific

workbbok
is open, so that if the user press e.g. Ctrl+C it would not work. Thanks.


You can use Application.OnKey to do this. Run the following line when
your workbook opens, either in the Auto_Open procedure or Workbook_Open
event:

Application.OnKey "^c", ""

This disables Ctrl+C copying. To enable it again when your workbook closes
add the following line to the Auto_Close procedure or Workbook_BeforeClose
event:

Application.OnKey "^c"

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Diactivate shortcut keys

Look in the Excel VBA help for SendKeys. It tells you how to do that. You
would have to put the appropriate code in the workbook level activate and
deactivate events.

--
Regards,
Tom Ogilvy

"Uddinj1" wrote in message
...
Hi
Thanks in advance.

Is there a way to diactivate the keyboard shortcuts while a specific

workbbok
is open, so that if the user press e.g. Ctrl+C it would not work. Thanks.

Regards



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
Shortcut Keys BACH Excel Discussion (Misc queries) 4 October 24th 08 01:09 AM
Shortcut Keys ? Jakobshavn Isbrae Excel Discussion (Misc queries) 1 March 20th 07 06:44 PM
shortcut keys tomruffner Excel Discussion (Misc queries) 2 February 28th 07 02:20 PM
Shortcut Keys John Whelan Excel Programming 4 April 10th 04 03:54 PM
Shortcut Keys Jase Excel Programming 0 September 11th 03 06:04 AM


All times are GMT +1. The time now is 04:48 AM.

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"