Hide my code

P

Phil

Is there a way to hide my macros and vb code so that no one can view it or
edit it?
Now, even with a protected sheet, I can just right click the sheet name and
choose view code and see the code. I'd like to be able to disable this
feature, if possible.

Thanks,
Phil
 
P

Peo Sjoblom

You can hide the code, press Alt + F11 and select the project in the project
pane to the left and right click and select VBA project properties there
you can select protection, then save the workbook or select it in the
project pane and do
Tools>VBAProject Properties>Protection tab
Check the box for "lock project for viewing"
and assign a password


--
Regards,

Peo Sjoblom

(No private emails please)
 
P

Peo Sjoblom

I should add that although the password is harder to break compared to sheet
and workbook protection it is still very weak and there are several password
breakers that you can buy and with hex editors that are methods that can be
found using any search engine

--
Regards,

Peo Sjoblom

(No private emails please)
 
P

Peo Sjoblom

Doh!

"with hex editors there are methods"

--
Regards,

Peo Sjoblom

(No private emails please)
 
P

Phil

Great thanks alot. I'm not too worried about people cracking the password as
the people using the spreadsheet don't have a clue about cracking passwords
and probably don't even know it can be done. I just want to make sure
someone doesn't start clicking around and views and edits the code by
mistake.
Thanks,

Phil
 
Top