How to protect excel's file

seb30

New Member
Joined
May 28, 2008
Messages
11
Hello everyone,

I saw an excel's file with his vba's code invisible.
How is it possible?
How can I do the same with my files?

Thanks in advance,

Seb
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
In the Visual Basic Editor, Tools > VBAProject Properties > Protection tab. Tick Lock Project for Viewing and enter a password. You will then have to save and re-open the file for the protection to take effect.

Note that Excel is not a very secure application: passwords can be cracked.
 
Upvote 0

seb30

New Member
Joined
May 28, 2008
Messages
11
This is how you protect your file from opening your project in the editor... am I right?
What I saw is: I could go to the project but when I clicked on thisWorkbook for example, I could not see anything.
 
Upvote 0

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,836
Office Version
  1. 2019
Platform
  1. Windows
Most likely there was no code in the ThisWorkbook class module. I can only imagine some rare possibility of white font otherwise. The code you are looking for might be somewhere else...
 
Upvote 0

Forum statistics

Threads
1,191,578
Messages
5,987,416
Members
440,096
Latest member
yanaungmyint

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top