Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
csilly1979
 
Posts: n/a
Default How to remove Keyboard Shortcut CTRL+D

Hi,
I would like to remove the Ctrl+D shortcut from the Excel cause it causes me
a lot of trouble. It's a built in shortcut. Can I remove it in any way? Tks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default How to remove Keyboard Shortcut CTRL+D

Hi csilly,
I'm guessing you want to remove the Ctrl + d shortcut for duplicating a
shape object.
If you paste the following code into the ThisWorkbook code module that
keyboard shortcut will be automatically disabled when that workbook is
opened...

Private Sub Workbook_Open()
Application.OnKey "^d", ""
End Sub

To get the code in place:

1. Copy
2. Right-click any of the worksheet tabs. A contextual popup menu
appears.
3. Select "View code" from the popup menu to get to the VBA editor
4. Go ViewProject Explorer to ensure that the Project Explorer is
visible.
5. Double click the ThisWorkbook icon (has the green X) to open the
ThisWorkbook code module.
6. Paste the code into place.
7. Press Alt + F11 or go FileClose and return to Microsoft Excel to
return to the workbook.

To see that the code has the desirable effect, close the workbook then
reopen.
Security level should be set to medium for the macro to work.


Ken Johnson

  #3   Report Post  
Posted to microsoft.public.excel.misc
csilly1979
 
Posts: n/a
Default How to remove Keyboard Shortcut CTRL+D

well, I work alot in Excel with importand data, and I have to save my work
quite often. And I hit by mistake Ctrl+D instead of Ctrl+S and this of course
alters my work... I really need to get rid of what Ctrl+D does (fills the
active cell with the value of the upper cell).
Tks again.

"Ken Johnson" wrote:

Hi csilly,
I'm guessing you want to remove the Ctrl + d shortcut for duplicating a
shape object.
If you paste the following code into the ThisWorkbook code module that
keyboard shortcut will be automatically disabled when that workbook is
opened...

Private Sub Workbook_Open()
Application.OnKey "^d", ""
End Sub

To get the code in place:

1. Copy
2. Right-click any of the worksheet tabs. A contextual popup menu
appears.
3. Select "View code" from the popup menu to get to the VBA editor
4. Go ViewProject Explorer to ensure that the Project Explorer is
visible.
5. Double click the ThisWorkbook icon (has the green X) to open the
ThisWorkbook code module.
6. Paste the code into place.
7. Press Alt + F11 or go FileClose and return to Microsoft Excel to
return to the workbook.

To see that the code has the desirable effect, close the workbook then
reopen.
Security level should be set to medium for the macro to work.


Ken Johnson


  #4   Report Post  
Posted to microsoft.public.excel.misc
Ken Johnson
 
Posts: n/a
Default How to remove Keyboard Shortcut CTRL+D

Hi,
You're welcome.
I've never used Ctrl+d to do that. I learn something new every day.
Thanks for that.
Ken Johnson

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
Keyboard shortcut not working when I copy macro to another computer telewats New Users to Excel 1 January 9th 06 08:52 PM
what is the keyboard shortcut for generating a sequence supreg Excel Worksheet Functions 1 December 27th 05 11:47 PM
keyboard shortcut for right click BigWheels Excel Discussion (Misc queries) 2 October 27th 05 05:07 PM
Is there a keyboard shortcut to center data in a cell? Phil_K Excel Worksheet Functions 1 April 24th 05 01:55 AM
Is there a keyboard shortcut for print preview? Mike Excel Discussion (Misc queries) 1 April 15th 05 12:04 PM


All times are GMT +1. The time now is 10:45 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"