Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default How to have Autofilter working in a protected sheet?

I am using a workbook with some autofilter on many columns
If I use them I am not able tho show again all adata without unprotecting
the sheet.
Is there any way of doing it?
Thank you
--
dilettante
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to have Autofilter working in a protected sheet?

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. (excel doesn't remember
it after closing the workbook.)

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

dilettante wrote:

I am using a workbook with some autofilter on many columns
If I use them I am not able tho show again all adata without unprotecting
the sheet.
Is there any way of doing it?
Thank you
--
dilettante


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default How to have Autofilter working in a protected sheet?

Dave,

thank you for answering.
The question is that I will have the worksheet protected while removing
autofilter results by menu Excel/Data/AutoFilter/ShowAll.
I will try to better understand your listing.
Regards
--
dilettante


"Dave Peterson" wrote:

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. (excel doesn't remember
it after closing the workbook.)

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

dilettante wrote:

I am using a workbook with some autofilter on many columns
If I use them I am not able tho show again all adata without unprotecting
the sheet.
Is there any way of doing it?
Thank you
--
dilettante


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default How to have Autofilter working in a protected sheet?

data|filter|showall will still be disabled when you protect the worksheet this
way.

Maybe you could provide an equivalent macro that does the same thing.

dilettante wrote:

Dave,

thank you for answering.
The question is that I will have the worksheet protected while removing
autofilter results by menu Excel/Data/AutoFilter/ShowAll.
I will try to better understand your listing.
Regards
--
dilettante

"Dave Peterson" wrote:

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. (excel doesn't remember
it after closing the workbook.)

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

dilettante wrote:

I am using a workbook with some autofilter on many columns
If I use them I am not able tho show again all adata without unprotecting
the sheet.
Is there any way of doing it?
Thank you
--
dilettante


--

Dave Peterson


--

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 not working on protected sheet. parahumanoid[_2_] Excel Discussion (Misc queries) 1 November 1st 09 05:52 PM
Protected Sheet and AutoFilter Steven Excel Programming 2 September 15th 06 02:13 AM
Autofilter in protected workbook not working Rumpa Biswas Excel Programming 6 January 27th 06 04:31 PM
Autofilter protected sheet vecia[_4_] Excel Programming 4 September 10th 05 08:25 AM
AutoFilter on a Protected sheet Olle[_2_] Excel Programming 1 June 15th 04 08:12 AM


All times are GMT +1. The time now is 08:07 AM.

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"