I need to put a password for a VBA code

gaftalik

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

Many Thanks !
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
hit Alt=F11 highlight the module then go to tools and VBA project properties. selct the security tab and enter a password
 
Upvote 0
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
 
Upvote 0
Yeah i did and still not asking for a password after i save and exit ! :o
 
Upvote 0
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.
 
Upvote 0
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:
 
Upvote 0
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 :-?
 
Upvote 0

Forum statistics

Threads
1,223,532
Messages
6,172,875
Members
452,486
Latest member
standw01

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
Back
Top