Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MDW MDW is offline
external usenet poster
 
Posts: 117
Default Protect Worksheet While Allowing Autofilter

I've got an Excel file that will be used by people using both Excel 2000 and
Excel 2003. At various points, I have VBA code that protects and unprotects
various sheets. However, these sheets have the AutoFilter option turned on,
and I find that in certain versions, the filters won't work as the sheets
are/aren't protected.

I know that in XL2003 the .Protect method actually allows you to enable
autofiltering, but that is not supported in XL2000.

Is there some other way I can do this?
--
Hmm...they have the Internet on COMPUTERS now!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Protect Worksheet While Allowing Autofilter

You can modify your code that protects the worksheet:

With Worksheets("sheet1")
.Protect Password:="hi", userinterfaceonly:=True
'.EnableOutlining = True
.EnableAutoFilter = True
End With

(assumes that data|filter has already been applied)


MDW wrote:

I've got an Excel file that will be used by people using both Excel 2000 and
Excel 2003. At various points, I have VBA code that protects and unprotects
various sheets. However, these sheets have the AutoFilter option turned on,
and I find that in certain versions, the filters won't work as the sheets
are/aren't protected.

I know that in XL2003 the .Protect method actually allows you to enable
autofiltering, but that is not supported in XL2000.

Is there some other way I can do this?
--
Hmm...they have the Internet on COMPUTERS now!


--

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
Excel Protect Function, while allowing macros RK Excel Worksheet Functions 2 December 18th 09 07:00 PM
How do I protect a number of sheets allowing the user to add a com Prashanth KR New Users to Excel 8 August 28th 07 04:06 PM
To Protect Excel documents and allowing only few cells to edit DHANRAJ Excel Worksheet Functions 1 March 29th 06 03:18 PM
Autofilter - allowing for error Robert Christie[_3_] Excel Programming 4 February 16th 05 09:07 AM
Protect sheets from editing but allowing macro to do so? NooK[_52_] Excel Programming 5 August 5th 04 03:55 PM


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