ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   autofilter (https://www.excelbanter.com/excel-discussion-misc-queries/122634-autofilter.html)

tankerman

autofilter
 
I was told by several people that you could not protect a spreadsheet and
autofilter it. By luck I found that if you autofilter and then protect your
sheet that the protection stay as well as the autofiltering.

Bob Phillips

autofilter
 
That's OK with 2003 as you select to allow Autofilter on a protected sheet.
Earlier versions don't have such an option.

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)


"tankerman" wrote in message
...
I was told by several people that you could not protect a spreadsheet and
autofilter it. By luck I found that if you autofilter and then protect
your
sheet that the protection stay as well as the autofiltering.




Dave Peterson

autofilter
 
If you already have the outline/subtotals/autofilter applied, you can protect
the worksheet in code (auto_open/workbook_open??).

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

It needs to be reset each time you open the workbook. (Earlier versions of
excel don't remember it after closing the workbook. IIRC, xl2002+ will remember
the setting under tools|Protection|protect sheet.)

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

tankerman wrote:

I was told by several people that you could not protect a spreadsheet and
autofilter it. By luck I found that if you autofilter and then protect your
sheet that the protection stay as well as the autofiltering.


--

Dave Peterson

Gord Dibben

autofilter
 
Why do say "by luck"?

You were given these instructions a couple of days ago along with the code to
achieve it.

In fact, you posted earlier thanking me for the code provided by Dave Peterson.




Gord Dibben MS Excel MVP

On Thu, 14 Dec 2006 01:46:00 -0800, tankerman
wrote:

I was told by several people that you could not protect a spreadsheet and
autofilter it. By luck I found that if you autofilter and then protect your
sheet that the protection stay as well as the autofiltering.




All times are GMT +1. The time now is 04:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com