I have a SS that puls data from another sheet using the following formula
=IF(OR('Site Visit ASSESSMENT'!D9={"PARTIAL COMPLIANCE","NOT COMPLIANT","NOT ASSESSED","ADDITIONAL INFO NEEDED"}),'Site Visit ASSESSMENT'!A9,"")
I also have VB Code in teh sheet as follows to hide rows. If I protect colum A and protect sheet I get an error. How can I protect the sheet and still have the following commnad work?
Private Sub CommandButton1_Click()
'Toggle rows hidden where cells in column D are blank
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
Else
Range("D3:D1000").AutoFilter Field:=1, Criteria1:="<>", VisibleDropDown:=False
End If
End Sub
Private Sub CommandButton2_Click()
Range("A3:G1000").ClearContents
End Sub
=IF(OR('Site Visit ASSESSMENT'!D9={"PARTIAL COMPLIANCE","NOT COMPLIANT","NOT ASSESSED","ADDITIONAL INFO NEEDED"}),'Site Visit ASSESSMENT'!A9,"")
I also have VB Code in teh sheet as follows to hide rows. If I protect colum A and protect sheet I get an error. How can I protect the sheet and still have the following commnad work?
Private Sub CommandButton1_Click()
'Toggle rows hidden where cells in column D are blank
If ActiveSheet.AutoFilterMode Then
ActiveSheet.AutoFilterMode = False
Else
Range("D3:D1000").AutoFilter Field:=1, Criteria1:="<>", VisibleDropDown:=False
End If
End Sub
Private Sub CommandButton2_Click()
Range("A3:G1000").ClearContents
End Sub