+ Reply to Thread
Results 1 to 4 of 4

How to remove Keyboard Shortcut CTRL+D

  1. #1
    csilly1979
    Guest

    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. #2
    Ken Johnson
    Guest

    Re: 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 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


  3. #3
    csilly1979
    Guest

    Re: 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 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
    >
    >


  4. #4
    Ken Johnson
    Guest

    Re: 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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1