Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Pivot Table on protected worksheet -

Hi Omer,

The following works for me -

Macro1 Macro
'
Sheets("Sheet1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Pivot Table on protected worksheet -

Thank you Peggy.
I had all "Protect" settings set to True (see my code below) and still
getting the same message.

Any other ideas?


"pshepard" wrote:

Hi Omer,

The following works for me -

Macro1 Macro
'
Sheets("Sheet1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Pivot Table on protected worksheet -

Hi Omer,

Actually I was only able to filter - not sort. So the ability to allow sort
when the sheet is protected does not work for me either.

Sorry - I think this may be a bug
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

Thank you Peggy.
I had all "Protect" settings set to True (see my code below) and still
getting the same message.

Any other ideas?


"pshepard" wrote:

Hi Omer,

The following works for me -

Macro1 Macro
'
Sheets("Sheet1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Pivot Table on protected worksheet -

Hi Omer,

The following allows filtering and sorting for pivot tables - I was not
getting a table to allow sorting is where I believe there is a bug.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True,
AllowUsingPivotTables:=True
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

Thank you Peggy.
I had all "Protect" settings set to True (see my code below) and still
getting the same message.

Any other ideas?


"pshepard" wrote:

Hi Omer,

The following works for me -

Macro1 Macro
'
Sheets("Sheet1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Pivot Table on protected worksheet -

Thabk You Peggy.
I guess there is something wrong with my table, since the parameters are
correct and I'm still unable to sort (even with the AllowSorting:=True). I
can do filtering but not sorting.
I'll try to re-create the table and try again.

Thank you for your help.
Regards,
OMER

"pshepard" wrote:

Hi Omer,

The following allows filtering and sorting for pivot tables - I was not
getting a table to allow sorting is where I believe there is a bug.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True,
AllowUsingPivotTables:=True
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

Thank you Peggy.
I had all "Protect" settings set to True (see my code below) and still
getting the same message.

Any other ideas?


"pshepard" wrote:

Hi Omer,

The following works for me -

Macro1 Macro
'
Sheets("Sheet1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Pivot Table on protected worksheet -

Hi Omer,

I posted the issue of sort on a protected worksheet as a microsoft comment -
and told them that I believe this to be a bug. Thank you for your last reply,
I appreciate it!
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

Thabk You Peggy.
I guess there is something wrong with my table, since the parameters are
correct and I'm still unable to sort (even with the AllowSorting:=True). I
can do filtering but not sorting.
I'll try to re-create the table and try again.

Thank you for your help.
Regards,
OMER

"pshepard" wrote:

Hi Omer,

The following allows filtering and sorting for pivot tables - I was not
getting a table to allow sorting is where I believe there is a bug.

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True,
AllowUsingPivotTables:=True
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

Thank you Peggy.
I had all "Protect" settings set to True (see my code below) and still
getting the same message.

Any other ideas?


"pshepard" wrote:

Hi Omer,

The following works for me -

Macro1 Macro
'
Sheets("Sheet1").Select
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowSorting:=True, AllowFiltering:=True
End Sub
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Pivot Table on protected worksheet -

You also have to go into the cells that need to be sorted, and deselect lock
for those cells - which means that a user will be able to edit them.
--
If this post helps click Yes
---------------
Peggy Shepard


"OMER" wrote:

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

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
Pivot Table in Protected Worksheet imapilot_152 Excel Programming 4 August 25th 09 07:50 PM
Enable page area of pivot table on protected worksheet TofTaf 63 Excel Programming 0 July 1st 09 01:04 PM
Enable the page area only of a pivot table for protected worksheet TofTaf 63 Excel Discussion (Misc queries) 0 July 1st 09 09:09 AM
Enable OLAP Pivot Table in Protected Excel 2003 Worksheet Rodrigo Excel Programming 0 August 4th 05 02:16 AM
Enable OLAP Pivot Table in Protected Excel 2003 Worksheet Rodrigo Excel Programming 0 August 3rd 05 12:17 AM


All times are GMT +1. The time now is 05:07 AM.

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"