Protection and AutoFilter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello all

I have a lot of code.. in a protected sheet... I want to beable to use autofilters and sorting in a protected sheet...

This is how my code is setup.

Worksheets("Current").Unprotect Password:="ABCD
[Lots of code in here
Worksheets("Current").Protect Password:="ABCD

The spreadsheet loads fine.. the sheet gets unprotected, the code does its work and then gets protected again! But when its protected... I need the autofitler dropdown menus to still work... but it wont let me use them.. What is the line(s) of code i need to resolve/fix this?
 
Hi
easiest way to get to this code would be recording a macro while
protecting the worksheet manually :-)
the following line works for Excel 2003:
ActiveSheet.Protect Password:="ABCD", AllowSorting:=True, _
AllowFiltering:=True
 
There are instructions here, for allowing AutoFilter on a protected
worksheet:

http://www.contextures.com/xlautofilter03.html#Protect
Hello all,

I have a lot of code.. in a protected sheet... I want to beable to use autofilters and sorting in a protected sheet...

This is how my code is setup..

Worksheets("Current").Unprotect Password:="ABCD"
[Lots of code in here]
Worksheets("Current").Protect Password:="ABCD"

The spreadsheet loads fine.. the sheet gets unprotected, the code does its work and then gets protected again! But when its protected... I need the autofitler dropdown menus to still work... but it wont let me use them.. What is the line(s) of code i need to resolve/fix this?
 

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

Back
Top