A
ADK
I have two worksheets which I have defined the columns with AutoFilter. I
have the sheets protected. When a user opens the sheet they can use those
predefined filters. I currently have the following code in WorkBook_Open. Is
this code even required ...if so is what I have correct?
Occasionally, the AutoFilter pull-downs stop working for some reason.
Current fix is to exit workbook and re-open it ....Auto-filters are fine
Using Excel 2000
Private Sub Workbook_Open()
On Error GoTo addError
With Worksheets("PDSR")
If Not .AutoFilterMode Then
.Unprotect Password:="12345"
.Range("A66").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="12345", _
Contents:=True, UserInterfaceOnly:=True
End With
With Worksheets("CompletionTable")
If Not .AutoFilterMode Then
.Unprotect Password:="12345"
.Range("C6:I6").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="12345", _
Contents:=True, UserInterfaceOnly:=True
have the sheets protected. When a user opens the sheet they can use those
predefined filters. I currently have the following code in WorkBook_Open. Is
this code even required ...if so is what I have correct?
Occasionally, the AutoFilter pull-downs stop working for some reason.
Current fix is to exit workbook and re-open it ....Auto-filters are fine
Using Excel 2000
Private Sub Workbook_Open()
On Error GoTo addError
With Worksheets("PDSR")
If Not .AutoFilterMode Then
.Unprotect Password:="12345"
.Range("A66").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="12345", _
Contents:=True, UserInterfaceOnly:=True
End With
With Worksheets("CompletionTable")
If Not .AutoFilterMode Then
.Unprotect Password:="12345"
.Range("C6:I6").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="12345", _
Contents:=True, UserInterfaceOnly:=True