I have a worksheet that is password protected. I want to create a
macro that will unprotect the worksheet, perform several operations,
and then reprotect the worksheet using the same password.
I have tried including the password within the macro to unprotect and
reprotect the worksheet, but I still get prompted for the password when
the macro runs.
Does anyone have any suggestions on how this can be accomplished?
Thanks for any help.
Crownman
Don Guillett - 16 Sep 2006 14:36 GMT
As ALWAYS, post your coding efforts for comments and suggestions.

Signature
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
>I have a worksheet that is password protected. I want to create a
> macro that will unprotect the worksheet, perform several operations,
[quoted text clipped - 9 lines]
>
> Crownman
Gord Dibben - 16 Sep 2006 17:09 GMT
ActiveSheet.Unprotect Password:="justme"
'do your stuff
ActiveSheet.Protect Password:="justme"
Gord Dibben MS Excel MVP
>I have a worksheet that is password protected. I want to create a
>macro that will unprotect the worksheet, perform several operations,
[quoted text clipped - 9 lines]
>
>Crownman
Crownman - 17 Sep 2006 03:07 GMT
Thanks for the answer, Gord. This is exactly what I needed.
Crownman
> ActiveSheet.Unprotect Password:="justme"
> 'do your stuff
[quoted text clipped - 15 lines]
> >
> >Crownman
Gord Dibben - 17 Sep 2006 17:03 GMT
Thanks for the feedback.
Gord
>Thanks for the answer, Gord. This is exactly what I needed.
>
[quoted text clipped - 19 lines]
>> >
>> >Crownman
Gord Dibben MS Excel MVP