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