PDA

View Full Version : Password entry



actbear
10-26-2007, 07:42 AM
Hi - can anybody help me. I need to unprotect a worksheet, amend it and then protect it again. The rest of the vba runs fine but I don't know how to include the password into the code so it doesn't have to entered manually as the code runs.
I'm very new to vba so any help is much appreciated.
Thanks in advance.
Charles

Bob Phillips
10-26-2007, 08:07 AM
Activesheet.Unprotect Password:="my_Password"

'do your stuff

Activesheet.Protect Password:="my_Password"