S
steve
I need to Sort on a protected worksheet.
I saw in another discussion some VBA code to place
in "ThisWorkbook" -- this code will allow Autofilter on a
protected worksheet. Here is that code:
Private Sub Workbook_Open()
'check for filter, turn on if none exists
With Worksheets("Output")
If Not .AutoFilterMode Then
.Range("A2").AutoFilter
End If
.EnableAutoFilter = True
' .EnableSort = True
.Protect Password:="wwca", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub
I added code of ".EnableSort = True" but it is not valid
code. What is the valid code for this. I am using Excel
2000. Thanks.
I saw in another discussion some VBA code to place
in "ThisWorkbook" -- this code will allow Autofilter on a
protected worksheet. Here is that code:
Private Sub Workbook_Open()
'check for filter, turn on if none exists
With Worksheets("Output")
If Not .AutoFilterMode Then
.Range("A2").AutoFilter
End If
.EnableAutoFilter = True
' .EnableSort = True
.Protect Password:="wwca", _
Contents:=True, UserInterfaceOnly:=True
End With
End Sub
I added code of ".EnableSort = True" but it is not valid
code. What is the valid code for this. I am using Excel
2000. Thanks.