Signaling the presence of a password

  • Thread starter Thread starter Geert Nauta
  • Start date Start date
G

Geert Nauta

Hey there,

Is there a way to find out, from inside a workbook,
if that workbook is password-protected or not.

Why.....?
I have created a workbook with some specific functions in
the buttonbar that should only be available to users that
have their workbook protected by a password, if not than
these buttons will not be enabled. I do not have to know
the password, just the knowledge that there is a password.

Thanks beforehand
Geert Nauta
 
Perhaps

If ActiveWorkbook.HasPassword = True Then

I have never used it, but it is in the xl2002 object model. Can't say for
earlier versions.
 
If you have protected the workbook windows then there is a
read-only ProtectWindows property that you can check.
Geof.
 
Hey Tom,
The 'ActiveWorkbook.HasPassword'property works.
Also in my Office2000

many thanks
Geert Nauta
 

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

Back
Top