Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 119
Default AUTOFILTER IN A PROTECTED WORKSHEET

I have a spreadsheet that has some colomns comprised completely of locked
cells, with the exception of the header column. Other columns have no locked
cells. However, after I protect the worksheet, the autofilter option is
greyed out for ALL the columns. I was hoping there was a way to be able to
autofilter the columns that have no locked cells while the worksheet is
protected. Is this possible?
--
William
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default AUTOFILTER IN A PROTECTED WORKSHEET

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
'If .FilterMode Then
' .ShowAllData
'End If
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 allow autofilter setting under tools|Protection|protect sheet, but that
won't help when you're filtering via code.)

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)


William wrote:

I have a spreadsheet that has some colomns comprised completely of locked
cells, with the exception of the header column. Other columns have no locked
cells. However, after I protect the worksheet, the autofilter option is
greyed out for ALL the columns. I was hoping there was a way to be able to
autofilter the columns that have no locked cells while the worksheet is
protected. Is this possible?
--
William


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AutoFilter on Protected Worksheet Excel 2003 aehan Excel Discussion (Misc queries) 7 February 23rd 09 10:51 PM
Using Autofilter on Protected sheets Yogin Excel Discussion (Misc queries) 3 August 3rd 08 05:30 PM
Autofilter set to "SHOW ALL" on open for a protected worksheet Sandra Excel Discussion (Misc queries) 10 September 18th 07 01:02 PM
Using Autofilter on a Protected Worksheet Brendan Vassallo Excel Discussion (Misc queries) 1 March 31st 06 01:08 PM
enable autofilter in a protected worksheet in Excel 97 WooGHeR Excel Worksheet Functions 1 March 25th 05 04:44 PM


All times are GMT +1. The time now is 10:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"