Recently, after few years, having bit more time today, I started brushing off my VBA programming skills.
I created VBA template which I am sharing with few users, and access is granted via VLookup from the UserList according to their phone number.
If user is not found, template displays message box and it closes.
Now, I would like to prevent access into VBA editor but still keep the access to template for validated users.
Any ideas on how to accomplish?
Especially the way to overcome CTRL + open, which I found lets you in the template and, in the VBA editor.
Thank you very much.
Access to VBA Template
-
- Administrator
- Posts: 78524
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Access to VBA Template
Welcome to Eileen's Lounge!
In the Visual Basic Editor, select Tools > <name> Properties... (<name> depends on the name of your database).
Activate the Protection tab.
Tick the 'Lock project for viewing' check box.
Enter a password in the Password box, and enter it again in the box below. Don't forget the password!
Click OK.
Next time the database is opened, the VBA code will still work normally, but users won't be able to view or edit the code unless you give them the password.
In the Visual Basic Editor, select Tools > <name> Properties... (<name> depends on the name of your database).
Activate the Protection tab.
Tick the 'Lock project for viewing' check box.
Enter a password in the Password box, and enter it again in the box below. Don't forget the password!
Click OK.
Next time the database is opened, the VBA code will still work normally, but users won't be able to view or edit the code unless you give them the password.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans
Hans
-
- NewLounger
- Posts: 2
- Joined: 06 Nov 2020, 02:42
Re: Access to VBA Template
Thank you very much HansV, will try it.