How to run macro on Excel 2007 protected sheet?
Are you sure that the name of the worksheet is "purchase order template" (watch
for extra spaces!)
Are you sure that the password is really "password" (watch upper/lower case)
What happens when you try to run it?
Valter wrote:
I have a Excel 2007 file, and want to run macro on the protected sheet. It
gives error at the very begining. I've found some sugestion using the
following code:
Sheets("Purchase Order Template").unprotect Password:="password"
and
Sheets("Purchase Order Template").protect Password:="password"
but it still doesn't work. Any idea what might do the trick? Thanks :)
--
Dave Peterson
|