Hi,
Excel version used: MSOffice ProPlus
Version 1705
I have a workbook with a couple of buttons allowing us to lock and unlock the workbook using a password.
Because we have many values, we need to enable auto filter on one cell range but, I have scratching my head about how to do this.
For some weird reason, auto filter appears to work for the last worksheet in the book.
I add " Application.ShowDevTools = True" to the existing VBA code and also tried allowing auto filter from each sheet but to no avail.
Can someone please help?
Vero
here is the code
Sub UnProtect()
'
' UnProtect Macro
' Takes off protections
'
Dim password As Variant
password = Application.InputBox("Enter Password", "Password Protected")
Select Case password
Case Is = False
'do nothing
Case Is = "PASSWORD"
Application.ShowDevTools = True
Sheet3.UnProtect password:="KareoSoftware"
Sheet4.UnProtect password:="KareoSoftware"
Sheet5.UnProtect password:="KareoSoftware"
Sheet6.UnProtect password:="KareoSoftware"
Sheet7.UnProtect password:="KareoSoftware"
Sheet8.UnProtect password:="KareoSoftware"
Sheet9.UnProtect password:="KareoSoftware"
Sheet13.UnProtect password:="KareoSoftware"
Sheet15.UnProtect password:="KareoSoftware"
Sheet16.UnProtect password:="KareoSoftware"
Sheet17.UnProtect password:="KareoSoftware"
Case Else
MsgBox "Incorrect Password"
End Select
'
ActiveWorkbook.Save
End Sub
Sub Protect()
'
' Protect Macro
'
Application.ShowDevTools = False
AllowFiltering = True
Sheet3.Protect password:="KareoSoftware"
Sheet4.Protect password:="KareoSoftware"
Sheet5.Protect password:="KareoSoftware"
Sheet6.Protect password:="KareoSoftware"
Sheet7.Protect password:="KareoSoftware"
Sheet8.Protect password:="KareoSoftware"
Sheet9.Protect password:="KareoSoftware"
Sheet13.Protect password:="KareoSoftware"
Sheet15.Protect password:="KareoSoftware"
Sheet16.Protect password:="KareoSoftware"
Sheet17.Protect password:="KareoSoftware"
'
End Sub
Excel version used: MSOffice ProPlus
Version 1705
I have a workbook with a couple of buttons allowing us to lock and unlock the workbook using a password.
Because we have many values, we need to enable auto filter on one cell range but, I have scratching my head about how to do this.
For some weird reason, auto filter appears to work for the last worksheet in the book.
I add " Application.ShowDevTools = True" to the existing VBA code and also tried allowing auto filter from each sheet but to no avail.
Can someone please help?
Vero
here is the code
Sub UnProtect()
'
' UnProtect Macro
' Takes off protections
'
Dim password As Variant
password = Application.InputBox("Enter Password", "Password Protected")
Select Case password
Case Is = False
'do nothing
Case Is = "PASSWORD"
Application.ShowDevTools = True
Sheet3.UnProtect password:="KareoSoftware"
Sheet4.UnProtect password:="KareoSoftware"
Sheet5.UnProtect password:="KareoSoftware"
Sheet6.UnProtect password:="KareoSoftware"
Sheet7.UnProtect password:="KareoSoftware"
Sheet8.UnProtect password:="KareoSoftware"
Sheet9.UnProtect password:="KareoSoftware"
Sheet13.UnProtect password:="KareoSoftware"
Sheet15.UnProtect password:="KareoSoftware"
Sheet16.UnProtect password:="KareoSoftware"
Sheet17.UnProtect password:="KareoSoftware"
Case Else
MsgBox "Incorrect Password"
End Select
'
ActiveWorkbook.Save
End Sub
Sub Protect()
'
' Protect Macro
'
Application.ShowDevTools = False
AllowFiltering = True
Sheet3.Protect password:="KareoSoftware"
Sheet4.Protect password:="KareoSoftware"
Sheet5.Protect password:="KareoSoftware"
Sheet6.Protect password:="KareoSoftware"
Sheet7.Protect password:="KareoSoftware"
Sheet8.Protect password:="KareoSoftware"
Sheet9.Protect password:="KareoSoftware"
Sheet13.Protect password:="KareoSoftware"
Sheet15.Protect password:="KareoSoftware"
Sheet16.Protect password:="KareoSoftware"
Sheet17.Protect password:="KareoSoftware"
'
End Sub