A
Alex
I have the error '438' - Object doesn't support this property or method.
Private Sub Worksheet_Activate() ' It's Sheet1
....
With Worksheets("Sheet1")
If Not .AutoFilterMode Then
.Range("A3").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
Selection.AutoFilter Field:=1 ' Here I have an error
....
Can anybody advise what's wrong with this code?
Thanks
Private Sub Worksheet_Activate() ' It's Sheet1
....
With Worksheets("Sheet1")
If Not .AutoFilterMode Then
.Range("A3").AutoFilter
End If
.EnableAutoFilter = True
.Protect Password:="password", _
Contents:=True, UserInterfaceOnly:=True
End With
Selection.AutoFilter Field:=1 ' Here I have an error
....
Can anybody advise what's wrong with this code?
Thanks