Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Protection controlled by macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Crownman - 16 Sep 2006 13:24 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.