View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
William Horton William Horton is offline
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