Enabling Macros on a Password Protected XLS

Closed
bavent - Jun 24, 2010 at 12:28 PM
rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 - Jun 24, 2010 at 06:30 PM
Hello,

Sub Macro2()
' Macro2 Macro
ActiveSheet.Unprotect ("engineroom")
ActiveSheet.Range("$A$2:$N$103").AutoFilter Field:=1, Criteria1:="Front Office"
Call Macro17
ActiveSheet.Protect ("engineroom")

End Sub

If also tried the same sequence by Calling up a separate macro as well.

Sub Macro2()
' Macro2 Macro
Call PW
ActiveSheet.Range("$A$2:$N$103").AutoFilter Field:=1, Criteria1:="Front Office"
Call Macro17
Call PW2

End Sub


---------------

Sub PW()

ActiveSheet.Unprotect ("engineroom")

End Sub

Sub PW2()

ActiveSheet.Protect ("engineroom")

End Sub


I appreciate the help!


Related:

1 response

rizvisa1 Posts 4478 Registration date Thursday January 28, 2010 Status Contributor Last seen May 5, 2022 766
Jun 24, 2010 at 06:30 PM
see if this works


ActiveSheet.Unprotect Password:="engineroom"
0