Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
PS PS is offline
external usenet poster
 
Posts: 18
Default MS Excel 2003 - Autofilter for protected cells

Hello

I have 3 cells A1, B1, and C1 that are protected and these are column
headings. I want to be able to autofilter the data under these columns using
auto filter. I locked these cells by selecting format-protection-locked.
I then selected protect this sheet and allow user to do autofilter and to
select unlock and locked cells. However, when I try to use autofilter for
these locked cells I still can't use autofilter. I also tried selecting
autofilter on these columns first and then protecting them but then I can not
use autofilter on the other columns that are not protected. Can you please
explain how I can make sure autofilter work on all cells of the sheet
including the locked cells?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default MS Excel 2003 - Autofilter for protected cells

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.)

PS wrote:

Hello

I have 3 cells A1, B1, and C1 that are protected and these are column
headings. I want to be able to autofilter the data under these columns using
auto filter. I locked these cells by selecting format-protection-locked.
I then selected protect this sheet and allow user to do autofilter and to
select unlock and locked cells. However, when I try to use autofilter for
these locked cells I still can't use autofilter. I also tried selecting
autofilter on these columns first and then protecting them but then I can not
use autofilter on the other columns that are not protected. Can you please
explain how I can make sure autofilter work on all cells of the sheet
including the locked cells?

Thanks.


--

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
Comments in protected cells with AutoFilter switched on TishyMouse Excel Discussion (Misc queries) 3 May 30th 07 01:34 PM
using autofilter in a shared protected workbook excel 2000? Needing Help for excel! Excel Discussion (Misc queries) 1 August 1st 06 06:24 PM
AutoFilter 2003 Excel Protected Sheet bdehning Excel Discussion (Misc queries) 3 December 27th 05 11:51 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 05:49 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"