Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Protected sheet: Macro to insert/delete colums 1

Status
Not open for further replies.

DajOne

Technical User
Joined
Jun 11, 2002
Messages
146
Location
CA
I created a macro that unprotect a spreadsheet, select the appropriate colums and insert them somewhere else. My problem is the macro does not work if I apply a password to the protection.. I looked into a VBA dictionnary to no avail with my limited knowledge...

Any ideas to allow the macro to remember the password?

Thanks
 
Is this what you are after

Worksheets("sheet1").Protect password:="letmein"

bandit600
 
That is it !!!

I tried the same to unprotect the sheet and the error messsage states that my password is incorrect.... and i triple checked it and it's the right one.. Is there an unprotect command?

Worksheets("sheet1").UnProtect password:="letmein"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top