Password protect VBA form

V

Vincent

Passwordprotecting a whole document is one thing. I find lots of help about
this. But what if you want to protect a form:
upon entering password A - form B opens.
upon entering password B - form D would open

Here's what I want to do:
1
After clicking a commandbutton I would want a password protection messagebox
showing up on the screen.
2
After entering the password - evalution
If YES - I would like an already prepared form showing
If No - The entire document shutting down.

help anyone?

Vincent
--
 
J

Jonathan West

Hi Vincent,

Comments below

Vincent said:
Passwordprotecting a whole document is one thing. I find lots of help
about
this. But what if you want to protect a form:
upon entering password A - form B opens.
upon entering password B - form D would open

Here's what I want to do:
1
After clicking a commandbutton I would want a password protection
messagebox
showing up on the screen.

Use an ordinary UserForm for this. it will have a TextBox on it into whuch
the user enters the password. You can prevent the actual password showing by
setting the PasswordChar property of the textbox.
2
After entering the password - evalution
If YES - I would like an already prepared form showing
If No - The entire document shutting down.

You evaluate the password entered, unload the password Userform, and then
carry on with whatever you want done.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top