Home
Forums
New posts
Search forums
Articles
Latest reviews
Search resources
Members
Current visitors
Newsgroups
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Programming
Enable autofilter in protected worksheets in Excel 2000
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="dazzag82, post: 13755760"] 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. [/QUOTE]
Verification
Post reply
Home
Forums
Newsgroups
Microsoft Excel
Microsoft Excel Programming
Enable autofilter in protected worksheets in Excel 2000
Top