More than one password in VBA macro

K

Ken Curtis

I use forms that are protected by password and I have installed a macro
designed by you people to overcome the SpellCheck 'problem': MS Spellcheck is
not available in protected forms. The macro is great. But I have a
question: How do I add another password to the string. Here is the script
that holds the password: Password:="mazie"
If I want to have another / different password (or more), do I just write
this:
Password:="mazie","apple","banana"
and the form chooses the password that locks it. Or is it rather more
complicated than I think it is ... which is usual.

Thanks!

Ken
 
W

Webboex

The document only has one password but you can ask your users to enter their
own passwords and test them using an IF statement before opening the file
with your own password. Use a variable (e.g. strPwd) to store the users input
then you can use the following to test their input:

If strPwd="mazie" or strPwd="apple" or strPwd="banana" then
etc

Webboex
 

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