Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / March 2004

Tip: Looking for answers? Try searching our database.

Cell Protection vs Auto Filter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TC - 04 Mar 2004 12:26 GMT
Is there any way of protecting cells from being altered,
moved etc, whilst still being able to run an auto filter
on them?

Regards,

TC
Dave Peterson - 05 Mar 2004 03:29 GMT
Before xl2002:

if the workbook isn't shared, you can protect the sheet in code and allow the
existing autofilter arrows to work:

Option Explicit
Sub auto_open()
   With Worksheets("Sheet1")
       .Protect Password:="hi", _
           userinterfaceonly:=True
       .EnableAutoFilter = True
   End With
End Sub

It needs to be reset each time you open the workbook.  (excel doesn't remember
it after closing the workbook.)

(you could use the workbook_open even under ThisWorkbook, too.)

====
But when the workbook is shared, you can't change the worksheet protection--so
this code will fail.

====

Starting with xl2002, there's an option under tools|protection that allows
existing autofilters to work.

> Is there any way of protecting cells from being altered,
> moved etc, whilst still being able to run an auto filter
[quoted text clipped - 3 lines]
>
> TC

Signature

Dave Peterson
ec35720@msn.com

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.