Link to home
Start Free TrialLog in
Avatar of Petersburg1
Petersburg1Flag for Russian Federation

asked on

VBA Code which allows auto filter and sort in a protected sheet

Hi Experts,
I found the following code but it is for Excel 2000 and does not work for my Excel 2007.
What need to be changed?
The name of the sheet it "Matrix" but I would like to name it COA-Matrix or COA_Matrix.
thanks for help

Private Sub Workbook_Open()
    Matrix.Protect Password:="123456", DrawingObjects:=True, _
        contents:=True, Scenarios:=True, _
        userinterfaceonly:=True
    Matrix.EnableAutoFilter = True
End Sub
ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Petersburg1

ASKER

thanks