View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
omer omer is offline
external usenet poster
 
Posts: 74
Default Pivot Table on protected worksheet -

Hola,
I'm using Excel 2007.

I have a table defined on a protected worksheet. It works great when the
worksheet is unprotected, but when I protect the worksheet (within a macro)
and then try to sort, filter, etc. (outside of the macro), I get the
following error message:

"The cell or chart you are trying to change is protected and therefore
read-only."

I've read similar entries within this site, and it looks that I´m still
missing something. Here is the code:

'
Range("Dashboard_Data_Table[[#Headers],[Project ID]]").Select
ActiveSheet.ListObjects("Dashboard_Data_Table").Ra nge.AutoFilter
Field:=3, _
Criteria1:="<"
Range("A1").Select
'
ActiveSheet.Protect DrawingObjects:=False, contents:=True, Scenarios:= _
True, AllowFormattingCells:=True, AllowFormattingColumns:=True, _
AllowFormattingRows:=True, AllowSorting:=True, AllowFiltering:=True, _
AllowUsingPivotTables:=True, userInterfaceOnly:=True,
Password:="password1"
'

Help is higly appreciated.
Regards
OMER