Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Password - Protect, UnProtect

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
( )
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Password - Protect, UnProtect

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



"MrAlMackay" wrote in message
...
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
( )



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Password - Protect, UnProtect

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




"MrAlMackay" wrote in message
...
Dave

Don't actually want the spreadsheet to be unprotected through

the macro.

I only want to get to the dialog box (@ this point I would need

the macro to
end) as this is when the user would type in the password or

alternatively if it
isn't one of the administrators they would exit out.

Is it possible to get the dialog box through VBA?

Appreciate your help on this.

Many Thanks, Al



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Password - Protect, UnProtect

Cheers for your help with this.

Worked a treat.

Thanks, Al.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Password - Protect, UnProtect

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Password - Protect, UnProtect

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protect/unprotect a formula The Wabster Excel Worksheet Functions 1 April 12th 09 11:37 AM
Protect, unprotect Pyrite Excel Discussion (Misc queries) 0 August 15th 08 03:18 PM
Protect/unprotect all sheets at once? wx4usa New Users to Excel 4 July 22nd 08 12:08 AM
Code to protect/unprotect a sheet using a macro with password FredH Excel Discussion (Misc queries) 5 October 23rd 07 04:49 PM
Protect / Unprotect with checkbox retseort Excel Discussion (Misc queries) 5 October 25th 05 03:45 PM


All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"