Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default autofilter and worksheet protection


for some reason, excel gives me the following error when i try to
execute an autofilter command on a protected worksheet:


run-time error '1004':

you cannot use this command on a protected sheet. etc. etc.


even though i set "allow all users of this worksheet to: use
autofilter" in the options dialog. what's wrong?


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default autofilter and worksheet protection

Hi dreamz

Before you protect the sheet turn on AutoFilter

See also
http://www.contextures.com/xlautofilter03.html#Protect


--
Regards Ron de Bruin
http://www.rondebruin.nl


"dreamz" wrote in message
...

for some reason, excel gives me the following error when i try to
execute an autofilter command on a protected worksheet:


run-time error '1004':

you cannot use this command on a protected sheet. etc. etc.


even though i set "allow all users of this worksheet to: use
autofilter" in the options dialog. what's wrong?


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 96
Default autofilter and worksheet protection

Protect the sheet with userinterface only turned on. Then in the visual
basic editor for that worksheet's property box ensure that enable autofilter
is set to True. To protect with userinterface only has to be done via a
macro but it only has to be done once and then you can get rid of the macro.
Press Alt & F11 to get to the visual basic editor.

ThisWorkbook.ActiveSheet.Protect userinterfaceonly:=True

"dreamz" wrote:


for some reason, excel gives me the following error when i try to
execute an autofilter command on a protected worksheet:


run-time error '1004':

you cannot use this command on a protected sheet. etc. etc.


even though i set "allow all users of this worksheet to: use
autofilter" in the options dialog. what's wrong?


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default autofilter and worksheet protection


the filter has already been created on the sheet and, since i'm using
excel 2003, i checked the "autofilter" option in the dialog. it still
does not work.


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default autofilter and worksheet protection


thanks, william. worked like a charm

--
dream
-----------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...fo&userid=2646
View this thread: http://www.excelforum.com/showthread.php?threadid=53556



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default autofilter and worksheet protection

Hi dreamz

Do you filter with code or manual

--
Regards Ron de Bruin
http://www.rondebruin.nl


"dreamz" wrote in message
...

the filter has already been created on the sheet and, since i'm using
excel 2003, i checked the "autofilter" option in the dialog. it still
does not work.


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default autofilter and worksheet protection

See also the code on Debra's site in my reply

--
Regards Ron de Bruin
http://www.rondebruin.nl


"dreamz" wrote in message
...

thanks, william. worked like a charm!


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default autofilter and worksheet protection


i filter with code.

everything works well now. my only remaining question is this: how can
i disable cell selection with the userinterfaceonly code? i want to
make it so that the end-user can click only those cells that i
designate.


--
dreamz
------------------------------------------------------------------------
dreamz's Profile: http://www.excelforum.com/member.php...o&userid=26462
View this thread: http://www.excelforum.com/showthread...hreadid=535565

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
How to Sort within AutoFilter with Protection on (and AutoFilter . giblon Excel Discussion (Misc queries) 1 February 16th 06 12:23 PM
Using Autofilter with Protection on Duncan Help Excel Worksheet Functions 1 November 8th 05 05:13 PM
Using AutoFilter with worksheet protection in 2000 vs. 2003 gncook Excel Discussion (Misc queries) 3 July 25th 05 08:02 PM
Excel 2000 AutoFilter and Worksheet protection Phillo Excel Programming 2 October 11th 04 02:54 PM
Autofilter and protection Jerett Excel Programming 1 January 3rd 04 02:44 AM


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