LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Enable autofilter in protected worksheets in Excel 2000

I have excel 2003 and have a created a spreadhseet for multipole users to
access. The format of the spreadhseet, data validations and formulas mean
that the worksheets need to be protected, which I have done with a password.
The protection does allow the use of autofilter. I did this by ticking the
appropriate check box in the Protect Sheet dialogue box.

The issue is that I have command buttons with macros to do certain tasks
such as sort data ranges by date and display various Custom Views. In order
for the macros to work each macro VBA code follows a 3 step rule.

1. Unprotect the relevant worksheet(s)
2. Perform task, e.g. display custom view
3. Reprotect the relevant worksheets and allow filtering.

The macros all work fine on my machine but if someone else who has excel
2000 clicks the command buttons the macros do not work. The debugging shows
that the issue is related to the use of autofilter in protected worksheets.
My research so far has led me to believe that the only solution to this is
that an upgrade to 2003 is required.

An example of the code I have to display a custom view is as follows

For Each Worksheet In ActiveWorkbook.Worksheets
Worksheet.Unprotect Password:="putpasswordhere"
Next

ActiveWorkbook.CustomViews("View1").Show

For Each Worksheet In ActiveWorkbook.Worksheets
Worksheet.Protect Password:="putpasswordhere", DrawingObjects:=True,
Contents:=True, Scenarios:=True, AllowFiltering:=True
Next

The "AllowFiltering:=True" text only seems to be understood in excel 2003.
Is there anhything I can use in my code which will work for 2000. The use of
autofilter is a neccessity and when clicking the comman buttons, the macros
must work so that after it has ran, the sheets have been reprotected again
and the use of autofilter is enabled. Please advise if VBA code can do this
or if I need an upgrade to 2003 for other users.


 
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
using autofilter in a shared protected workbook excel 2000? Needing Help for excel! Excel Discussion (Misc queries) 1 August 1st 06 06:24 PM
problems w solution 4 enable AutoFilter for a protected worksheet sharona Excel Programming 1 October 13th 05 04:59 PM
How do I enable autofilter on a protected shared workbook? Bungle Excel Discussion (Misc queries) 3 August 9th 05 02:33 AM
enable autofilter in a protected worksheet in Excel 97 WooGHeR Excel Worksheet Functions 1 March 25th 05 04:44 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 08:53 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"