Hello,
I have an issue I can't figure out. I have a spreadsheet with several control buttons that run VBA macros to filter the spreadsheet based on criteria. I also have code in the last line to AllowFiltering (spreadsheet is password protected and we want to allow users to utilize other filtering options).
I added a control button to remove any filters created by the control buttons and added the code to AllowFiltering to this new button but it is not working (the Allow Filtering options). Does anyone have any idea why? This same code (last line below that applies password) works on every other button I have added, but not for this one, so I imagine I have something incorrect. My code is below.
Any help would be appreciated.
Thanks! Kat
I have an issue I can't figure out. I have a spreadsheet with several control buttons that run VBA macros to filter the spreadsheet based on criteria. I also have code in the last line to AllowFiltering (spreadsheet is password protected and we want to allow users to utilize other filtering options).
I added a control button to remove any filters created by the control buttons and added the code to AllowFiltering to this new button but it is not working (the Allow Filtering options). Does anyone have any idea why? This same code (last line below that applies password) works on every other button I have added, but not for this one, so I imagine I have something incorrect. My code is below.
Any help would be appreciated.
Thanks! Kat
VBA Code:
Sub ClearFilters_Click()
ActiveSheet.Unprotect Password:="1234"
Sheets("CMLog").AutoFilterMode = False
ThisWorkbook.RefreshAll
Range("E4") = ("ALL")
Range("H4") = ("ALL")
Range("M4") = ("ALL")
ActiveSheet.Protect Password:="1234", AllowFiltering:=True
End Sub