Hi,
I'm getting a 1004 Run time Error on the attached Workbook. I've added Worksheet protection to each Worksheet. I get an error on the 'WEAPS_QUAL_RPTS' worksheet when I run a "Clear Filter" Macro assigned to the button on the same sheet.
The Attached file is an .xlsb version to reduce size. The Sheet Protection Password is: Admin
WEAPS_RPTS_MISC Module Code (the line highlighted in bold is where I get the error in question.)
Sub WeapQualRpt_ClearFilter()
With Sheet9
'Sheet6.Range("AI3:AH3").ClearContents
.Range("E28").Value = "[Enter Event Type]"
.Range("F6").Value = "[Enter Last Name]"
.Range("G6").Value = "[Enter First Name]"
.Range("H6").Value = "[All]" 'All Duty Sections
.Range("I6").Value = "[All]" 'SRF-B Completions
.Range("J6").Value = "[All]" 'SRF-A Completions
.Range("BX2:BY2").Value = "" 'All 9MM Expiration dates
.Range("CG2:CH2").Value = "" 'All M16 Expiration dates
If ActiveSheet.AutoFilterMode Then
.AutoFilter.ShowAllData
.AutoFilterMode = False
End If
End With
WeaponsRpt_Table 'Run Events Refresh Macro
End Sub
ProtectAll_UnProtectAll Module
Sub Protect_All()
Dim ws As Worksheet
'turn screen updating off
Application.ScreenUpdating = False
'loop through the sheets
For Each ws In ActiveWorkbook.Worksheets
ws.Protect Password:="Admin", DrawingObjects:=False, Contents:=False, Scenarios:=True, _
AllowFormattingCells:=False, AllowDeletingColumns:=False, AllowDeletingRows:=False, _
AllowFiltering:=True, UserInterfaceOnly:=True
Next ws
Application.ScreenUpdating = True
End Sub
Additionally, I was hoping to protect the Cells in the Table be protected from editing but allow for selection (I have conditional formatting to highlight selected row.)
Thank you in advance for reading my post.
V/r,
Jim
Bookmarks