Password - Protect, UnProtect

  • Thread starter Thread starter MrAlMackay
  • Start date Start date
M

MrAlMackay

Could anyone help me with the below:

Would like to have a macro that does the following:

1) Goes to the Unprotect Sheet dialog box where the user will need to enter in
the password.

2) Also would like this macro to load up automatically when I open my
spreadsheet. I know I can use Auto_Open however I want to call this macro
within the Auto_Open macro.

Appreciate your help on the above,

Many Thanks - Al Mackay
( (e-mail address removed) )
 
Problem with using macros and unprotect commands is that you can see the
password in your vba code, have password typed in as varable.

Dave
 
Al,

If you attempt to unprotect a password-protected sheet without
supplying the password, Excel will automatically prompt for the
password.

ActiveSheet.Unprotect



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
Have a similar issue but want to call the the Protect Sheet dialog box
via VBA to allow the user to enter a password if desired - can someone
advise how I might do this?

Thanks!

Jeff
 
Application.Dialogs(xlDialogProtectDocument).Show
just use that line and the dialog box will appear, note this will only apply
to the active sheet!.
xl 2003
 
Thanks Ben - I'll give that a try but wanted to clarify - Did you mean
that this will only work in Excel 2003? If so, are there other
solutions for Excel 97, 2K & XP? Am wanting this code to work across
all versions from 97 onwards ...

Jeff
 

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