Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Autofilter of Protected Sheet - Excel 2000 (not 2003 or 2007)

I have read multiple posts on here about using "Autofiltering=True" when the
Protect function is used to allow Autofiltering.

I can see this (and multiple other sub options) in the Help File for Excel
2003. However I am writing an application for Excel 2000 and this option does
not appear available. I would like the Autofilter for various columns to be
selectable, either by the user or macros, whilst the Worksheet is protected.

Is there anyway around this apart from making users upgrade their version of
Excel ? I am assuming the answer is 'No' but if someone tells me otherwise I
will be very happy.

Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Autofilter of Protected Sheet - Excel 2000 (not 2003 or 2007)

You need to set UserInterfaceOnly, but as the setting doesn't persist
between sessions need to set it in the open event.

Apply the filter on an unprotected sheet then run the macro. Also run the
macro from the open event.

'' ThisWorkbook module
Private Sub Workbook_Open()
ProtectAndFilter
End Sub

' normal module
Sub ProtectAndFilter()

With ThisWorkbook.Worksheets("Sheet1")
.Protect _
Password:="abc", _
DrawingObjects:=False, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True

.EnableAutoFilter = True
End With

End Sub

Regards,
Peter T



"DSMessenger" wrote in message
...
I have read multiple posts on here about using "Autofiltering=True" when
the
Protect function is used to allow Autofiltering.

I can see this (and multiple other sub options) in the Help File for Excel
2003. However I am writing an application for Excel 2000 and this option
does
not appear available. I would like the Autofilter for various columns to
be
selectable, either by the user or macros, whilst the Worksheet is
protected.

Is there anyway around this apart from making users upgrade their version
of
Excel ? I am assuming the answer is 'No' but if someone tells me otherwise
I
will be very happy.

Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Autofilter of Protected Sheet - Excel 2000 (not 2003 or 2007)

Thanks Peter. Easily done as I already set-up Commandbars and other things in
the Open Event.

I had also read on here about the UserInterfaceOnly option but had not found
its companion EnableAutoFilter which works in combination with it.

This Discussion Page is 'gold' and 95% on the time I can solve a problem
simply by searching the past posts ... and where that fails the remaining 5%
of the time my post is answered within 24 hours anyway.

"Peter T" wrote:

You need to set UserInterfaceOnly, but as the setting doesn't persist
between sessions need to set it in the open event.

Apply the filter on an unprotected sheet then run the macro. Also run the
macro from the open event.

'' ThisWorkbook module
Private Sub Workbook_Open()
ProtectAndFilter
End Sub

' normal module
Sub ProtectAndFilter()

With ThisWorkbook.Worksheets("Sheet1")
.Protect _
Password:="abc", _
DrawingObjects:=False, _
Contents:=True, _
Scenarios:=True, _
UserInterfaceOnly:=True

.EnableAutoFilter = True
End With

End Sub

Regards,
Peter T



"DSMessenger" wrote in message
...
I have read multiple posts on here about using "Autofiltering=True" when
the
Protect function is used to allow Autofiltering.

I can see this (and multiple other sub options) in the Help File for Excel
2003. However I am writing an application for Excel 2000 and this option
does
not appear available. I would like the Autofilter for various columns to
be
selectable, either by the user or macros, whilst the Worksheet is
protected.

Is there anyway around this apart from making users upgrade their version
of
Excel ? I am assuming the answer is 'No' but if someone tells me otherwise
I
will be very happy.

Thanks in advance.



.

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
excel 2007 autofilter change to 2003 autofilter functionality? jonnybrovo815 Excel Discussion (Misc queries) 1 April 19th 10 10:05 PM
Enable autofilter in protected worksheets in Excel 2000 dazzag82 Excel Programming 6 January 7th 10 05:05 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 filter to work in a protected sheet from Excel 2003 to 2000 Metallo[_3_] Excel Programming 2 November 26th 04 03:58 PM


All times are GMT +1. The time now is 01:31 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"