Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Password protect VBA form

2 views
Skip to first unread message

Vincent

unread,
Feb 18, 2005, 7:45:02 AM2/18/05
to
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
--

Jonathan West

unread,
Feb 18, 2005, 9:04:33 AM2/18/05
to
Hi Vincent,

Comments below

"Vincent" <Vin...@discussions.microsoft.com> wrote in message
news:78A6CA38-4F67-4C7C...@microsoft.com...


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

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

0 new messages