Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Enabling a list autofilter in a protected worksheet - Excel 2003

I have a list set up within a worksheet and I need to protect the worksheet
and still be able to filter the list.

If I select Protect Sheet and check Enable Autofilter then it works but this
option prevents me being able to collapse the rows using the grouping.

I therefore tried a macro I found here so that the grouping works but this
stops my list filter working. The macro I'm using is:

Sub workbook_open()
With Worksheets("My Sheet Name")
.Protect , userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With

Any suggestions on a command I can include in the macro so the list filter
and grouping both work in the protected sheet?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Enabling a list autofilter in a protected worksheet - Excel 2003

When I run your code in XL2003 both autofilter and outlining work. I can
send my simple workbook if you like.

--
Jim
"Spottydog" wrote in message
...
|I have a list set up within a worksheet and I need to protect the worksheet
| and still be able to filter the list.
|
| If I select Protect Sheet and check Enable Autofilter then it works but
this
| option prevents me being able to collapse the rows using the grouping.
|
| I therefore tried a macro I found here so that the grouping works but this
| stops my list filter working. The macro I'm using is:
|
| Sub workbook_open()
| With Worksheets("My Sheet Name")
| .Protect , userinterfaceonly:=True
| .EnableOutlining = True
| .EnableAutoFilter = True
| End With
|
| Any suggestions on a command I can include in the macro so the list
filter
| and grouping both work in the protected sheet?
|
| Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Enabling a list autofilter in a protected worksheet - Excel 2003

This worked ok for me--allowing filtering of lists and filtering using
data|filter|autofilter.

Option Explicit
Sub workbook_open()
With Worksheets("My Sheet Name")
.Protect userinterfaceonly:=True, AllowFiltering:=True
.EnableOutlining = True
End With
End Sub

Spottydog wrote:

I have a list set up within a worksheet and I need to protect the worksheet
and still be able to filter the list.

If I select Protect Sheet and check Enable Autofilter then it works but this
option prevents me being able to collapse the rows using the grouping.

I therefore tried a macro I found here so that the grouping works but this
stops my list filter working. The macro I'm using is:

Sub workbook_open()
With Worksheets("My Sheet Name")
.Protect , userinterfaceonly:=True
.EnableOutlining = True
.EnableAutoFilter = True
End With

Any suggestions on a command I can include in the macro so the list filter
and grouping both work in the protected sheet?

Thanks


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Enabling a list autofilter in a protected worksheet - Excel 20

Yes, I missed that you're doing this with an official 'list'. I tried this
code and it seemed to allow filtering with a list:

..Protect userinterfaceonly:=True, AllowFiltering:=True

--
Jim
"Spottydog" wrote in message
...
|I think I possibly didn't explain myself correctly.
|
| I have set up a list by selecting a number of cells with the top cell
being
| the header (say E4 to E38) Then I select Data--List--Create List and my
| selection shows in the pop up plus I select "My list has headers". On
| clicking OK Excel creates an autofilter dropdown on the header cell which
| covers the cells in my list only.
|
| This is a separate filter to the Data--Filter--Autofilter (although
Excel
| also marks the auto filter as switched on with it) and I can also set up
an
| autofilter at the same time in the spreadsheet (Excel swaps between them
| enabling the list filter when you click on a cell in the list and the main
| autofilter if you click anywhere else in the worksheet).
|
| Its the list filter that does not work when the macro is run but works
when
| I select protect from the menubar
|
| "Jim Rech" wrote:
|
| When I run your code in XL2003 both autofilter and outlining work. I
can
| send my simple workbook if you like.
|
| --
| Jim
| "Spottydog" wrote in message
| ...
| |I have a list set up within a worksheet and I need to protect the
worksheet
| | and still be able to filter the list.
| |
| | If I select Protect Sheet and check Enable Autofilter then it works
but
| this
| | option prevents me being able to collapse the rows using the grouping.
| |
| | I therefore tried a macro I found here so that the grouping works but
this
| | stops my list filter working. The macro I'm using is:
| |
| | Sub workbook_open()
| | With Worksheets("My Sheet Name")
| | .Protect , userinterfaceonly:=True
| | .EnableOutlining = True
| | .EnableAutoFilter = True
| | End With
| |
| | Any suggestions on a command I can include in the macro so the list
| filter
| | and grouping both work in the protected sheet?
| |
| | Thanks
|
|
|


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
Enabling Autofilter and Sorting in a Protected Sheet [email protected] Excel Discussion (Misc queries) 2 January 3rd 12 07:14 PM
Enabling Spell Check in Protected Worksheet Barb Reinhardt Excel Discussion (Misc queries) 2 May 10th 10 08:49 PM
AutoFilter on Protected Worksheet Excel 2003 aehan Excel Discussion (Misc queries) 7 February 23rd 09 10:51 PM
AutoFilter 2003 Excel Protected Sheet bdehning Excel Discussion (Misc queries) 3 December 27th 05 11:51 PM
Enabling comments on a protected worksheet S Phadke Excel Programming 1 September 2nd 03 09:37 PM


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

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

About Us

"It's about Microsoft Excel"