View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Roady Roady is offline
external usenet poster
 
Posts: 69
Default Macro- not re-password protecting

Hi:

I am using a macro that involves unprotecting and protecting the sheet at
the beginning and end of the macro. I have used this same code in a different
spreadsheet's macro and it worked fine (including the allow filter part).
However, when I run it on this spreadsheet, it re-protects it at the end, but
WITHOUT the password. the code I am using is as follows:

Sub Macro1()
ActiveSheet.Unprotect Password:="Stars"

(All Macro details go here...)

ActiveSheet.Protect Password:="Stars"
ActiveSheet.Protect AllowFiltering:=True

End Sub

Do you have any idea why it protects it but without the necessary password?
thank you!