I need to put a password for a VBA code

gaftalik

Well-known Member
Joined
Feb 6, 2003
Messages
518
Office Version
  1. 2016
Platform
  1. Windows
Hi ,
How can i put a password for a module to be opened?

Many Thanks !
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

listerheb

Active Member
Joined
Aug 22, 2003
Messages
262
hit Alt=F11 highlight the module then go to tools and VBA project properties. selct the security tab and enter a password
 

gaftalik

Well-known Member
Joined
Feb 6, 2003
Messages
518
Office Version
  1. 2016
Platform
  1. Windows
Hi , i tried that , i inserted a password , saved and exit, tried to access it again it opened without asking for a password, did i miss anything ?
Thank you
 

gaftalik

Well-known Member
Joined
Feb 6, 2003
Messages
518
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Yeah i did and still not asking for a password after i save and exit ! :eek:
 

listerheb

Active Member
Joined
Aug 22, 2003
Messages
262
In your original question you said module. Are you trying to protect the workbook or just the VBA code. Becasue I told you how to protect the VBA code.
 

gaftalik

Well-known Member
Joined
Feb 6, 2003
Messages
518
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

To be frank with you i dont know the difference , but i dont want anybody to see the code inside the module because i saw modules which you needed password for it to open thats what i need.

Sorry if i was not clear :oops:
 

gaftalik

Well-known Member
Joined
Feb 6, 2003
Messages
518
Office Version
  1. 2016
Platform
  1. Windows
Yes i saved the workbook and yet no password was saved , even if i click on the module and go to the Vba properties under tools , in the protection tab i see the password i typed and the lock project is checked, and still not working :confused:
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,095
Messages
5,768,053
Members
425,451
Latest member
JohnBrooksBiddle

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