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.
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.
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 View>Project 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 File>Close 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
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 View>Project 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 File>Close 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
>
>
Hi,
You're welcome.
I've never used Ctrl+d to do that. I learn something new every day.
Thanks for that.
Ken Johnson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks