The suggested method is changing the ctrl-D keystroke for the Excel Application. Not just the single workbook. To do it for a single workbook, but not other open workbooks, you would need to put the commands in Workbook_Activate/deactivate events.
As for password protecting it... There are several ways, some more secure than others. However, if you put the enable/disable commands in the Activate/Deactivate events, the user will have to enter the password whenever he/she switches from one workbook to another! although, it MIGHT be possible to store the user entered password in a Public variable and test it during the event macro. As for how to prompt for the password: How "critical" is this password protection? For instance: if it is just a "formality", and you don't care if the password is displayed while typing, you could use an input box, have the user enter the password, then compare the returned value to your stored password. If you want the password to appear as: ******** then that takes a bit more work. also, where is the "correct" value stored? within the VBA code? on a hidden worksheet? in a file on the network? If you don't want the users to be able to read the password in the VBA code, you'll have to password protect the VBA project also... let me know how you would like this to work... Paul ----------------------------------------- “Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” - John Wesley ----------------------------------------- ________________________________ From: Muralidhar E <emuralidha...@gmail.com> To: excel-macros@googlegroups.com Sent: Wed, June 27, 2012 7:02:54 AM Subject: Re: $$Excel-Macros$$ Enable & Disable Ctrl+D with passward Dear all, At the same opened other excel files also not working the Ctrl+D option. I want to disable this option for the same sheet with a passward for enabling and disbling.It will works for other files as usually. Thanks in advance. On Wed, Jun 27, 2012 at 4:24 PM, Muralidhar E <emuralidha...@gmail.com> wrote: Hi, > >Thank u, > >But i am also need the passward to enbale and disable Ctrl+D option. >Thanks in advance. > > >Thanks & Regards, > >Muralidhar E. >Think different >Do Different >Make different > > >On Wed, Jun 27, 2012 at 3:58 PM, NOORAIN ANSARI <noorain.ans...@gmail.com> >wrote: > >Dear Murali, >> >>See attached sheet for reference. >> >> >>On Wed, Jun 27, 2012 at 3:56 PM, NOORAIN ANSARI >><noorain.ans...@gmail.com> wrote: >>> Dear Murali, >>> >>> Please try it.. >>> >>> Private Sub Workbook_Open() >>> Application.OnKey "^d", "" >>> End Sub >>> >>> Private Sub Workbook_BeforeClose(Cancel As Boolean) >>> Application.OnKey "^d" >>> End Sub >>> >>> -- >>> Thanks & regards, >>> Noorain Ansari >>> www.noorainansari.com >>> www.excelmacroworld.blogspot.com >>> >>> On Wed, Jun 27, 2012 at 3:03 PM, Muralidhar E <emuralidha...@gmail.com> >wrote: >>>> >>>> Dear all, >>>> >>>> Iam using Office 2007, when iam need to use Crl+F accidently iam hitting >>>> Ctrl+D, iam loosing some data and iam unable to find the changes happening >>>> to the data file. >>>> Iam want to disable Ctrl+D option with a passward and the same enable with >>>> passward, it should for that worksheet only. >>>> >>>> Thanks in advance. >>>> -- >>>> Thanks & Regards, >>>> >>>> Muralidhar E. >>>> >>>> -- >>>> -- >>>> FORUM RULES (986+ members already BANNED for violation) >>>> >>>> 1) Use concise, accurate thread titles. Poor thread titles, like Please >>>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will >>>> not get quick attention or may not be answered. >>>> >>>> 2) Don't post a question in the thread of another member. >>>> >>>> 3) Don't post questions regarding breaking or bypassing any security >>>> measure. >>>> >>>> 4) Acknowledge the responses you receive, good or bad. >>>> >>>> 5) Cross-promotion of, or links to, forums competitive to this forum in >>>> signatures are prohibited. >>>> >>>> NOTE : Don't ever post personal or confidential data in a workbook. Forum >>>> owners and members are not responsible for any loss. >>>> >>>>------------------------------------------------------------------------------------------------------ >>>>- >>>> To post to this group, send email to excel-macros@googlegroups.com >>>> >>>> To unsubscribe, send a blank email to >>>> excel-macros+unsubscr...@googlegroups.com >>>> >>>> >> >> >> >>-- >>Thanks & regards, >>Noorain Ansari >>www.noorainansari.com >>www.excelmacroworld.blogspot.com >> >>-- >>-- >>FORUM RULES (986+ members already BANNED for violation) >> >>1) Use concise, accurate thread titles. Poor thread titles, like Please Help, >>Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not >>get >>quick attention or may not be answered. >> >>2) Don't post a question in the thread of another member. >> >>3) Don't post questions regarding breaking or bypassing any security measure. >> >>4) Acknowledge the responses you receive, good or bad. >> >>5) Cross-promotion of, or links to, forums competitive to this forum in >>signatures are prohibited. >> >>NOTE : Don't ever post personal or confidential data in a workbook. Forum >>owners and members are not responsible for any loss. >> >>------------------------------------------------------------------------------------------------------ >> >>To post to this group, send email to excel-macros@googlegroups.com >> >>To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com >> >> >> > > >-- > >Thanks & Regards, > >Muralidhar E. >Think different >Do Different >Make different > -- Thanks & Regards, Muralidhar E. Think different Do Different Make different -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com