Disable Ctrl D for particular workbook

0 votes
How to disable the CTRL+D shortcut for a particular workbook? I can disable Macro but macros will affect all the excel workbooks.
Nov 8 in Others by Kithuzzz
• 20,660 points
38 views

1 answer to this question.

0 votes

When you click CTRL+D, it will now check the workbook's name; if it is Book1, nothing will happen; if not, the default fill down event will take place.

Sub Sample()
Application.OnKey "^d", "CheckWorkbook"
End Sub

Sub CheckWorkbook()
If ActiveWorkbook.Name = "Book1" Then
    Exit Sub
Else
    Selection.FillDown
End If
End Sub

Or

Sub Sample()
Application.OnKey "^d", "CheckWorkbook"
End Sub

Sub CheckWorkbook()
If ActiveWorkbook.Name <> "Book1" Then
    Selection.FillDown
End If
End Sub
answered Nov 8 by narikkadan
• 37,660 points

Related Questions In Others

0 votes
1 answer

Creating custom property for .net assembly

While your compiler does not really support ...READ MORE

answered Nov 13, 2018 in Others by DataKing99
• 8,240 points
236 views
+2 votes
2 answers
0 votes
1 answer

Get files in my own file format for its own dynamic icon

Regarding MAC support, "The Mac and Windows ...READ MORE

answered Jan 8, 2019 in Others by DataKing99
• 8,240 points
608 views
0 votes
1 answer

Where is the documentation to refer for coinbase api integration of Etherium coin currency in php?

Hey there! Please refer to the following ...READ MORE

answered Jan 25, 2019 in Others by Omkar
• 69,210 points
319 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,720 points
451 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
2,218 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9 in Others by gaurav
• 22,040 points
69 views
0 votes
2 answers

How to copy a formula horizontally within a table using Excel VBA?

Hi so basically, create an adjacent column ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
205 views
0 votes
1 answer
0 votes
2 answers

What is most SEO optimized image HTML code for?

What is most SEO optimized image HTML ...READ MORE

answered Feb 12 in Others by gdxxfgoidt
488 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP