-1

I want a method that will password protect my vba code, so that users in the sheet won't be able to go into the code editor without entering it.

Lance Roberts
  • 22,383
  • 32
  • 112
  • 130
michelle
  • 163
  • 3
  • 4
  • 9
  • ?? can you edit and rephrase the question, this is not clear... – almog.ori Jul 22 '11 at 08:39
  • I have a vba project with code written on it..when other users opens the sheet he or she can open it but when he or she want to 'view code' den a password protect message will appear..he or she will have to enter the correct password to view the code..Plz can u giv me the code – michelle Jul 22 '11 at 08:45
  • That's not done by code. That is done by using the VBE menus. – iDevlop Jul 22 '11 at 09:00
  • Can you decribe me the details – michelle Jul 22 '11 at 09:14
  • @michelle: every menu is described step by step in the first link i gave you in my answer. Have a look ! – JMax Jul 22 '11 at 11:24
  • This question belongs on SuperUser. – Andy Jul 22 '11 at 18:40

1 Answers1

2

You can protect your vba code by a password as described here: http://www.ozgrid.com/VBA/protect-vba-code.htm

But this is not the most secure way to protect your code, see this thread for more information: Lock down Microsoft Excel macro

Community
  • 1
  • 1
JMax
  • 26,109
  • 12
  • 69
  • 88
  • 2
    @michelle: please, have a look at the [faq](http://stackoverflow.com/faq) and write in full english. Next, have a look at the link i gave you, there is no vba code to use – JMax Jul 22 '11 at 08:58