autofilter and worksheet protection

D

dreamz

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?
 
G

Guest

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
 
D

dreamz

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.
 
D

dreamz

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top