Solved

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

Posted on 2011-09-02
2
469 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:Petersburg1
2 Comments
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 250 total points
ID: 36472586
Assuming you have renamed then try

Chris
Private Sub Workbook_Open()
    Sheets("COA-Matrix").Protect Password:="123456", DrawingObjects:=True, _
        contents:=True, Scenarios:=True, _
        userinterfaceonly:=True
    Sheets("COA-Matrix")EnableAutoFilter = True
End Sub

Open in new window

0
 

Author Closing Comment

by:Petersburg1
ID: 36473844
thanks
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The System Center Operations Manager 2012, known as SCOM, is a part of the Microsoft system center product that provides the user with infrastructure monitoring and application performance monitoring. SCOM monitors:   Windows or UNIX/LinuxNetwo…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now