View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Signaling the presence of a password

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.

--
Regards,
Tom Ogilvy


"Geert Nauta" wrote in message
...
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