Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi I need to ensure that users can't edit the queries underlying pivot
tables. I don't want to turn sheet protection on and off as this has caused problems with corrupting the pivots. I am using the following code and it just ain't working: Public Sub ProtectPivots() Dim ws As Worksheet Dim QueryTables As QueryTables Dim Query As QueryTable For Each ws In ActiveWorkbook.Worksheets ws.Activate Range("B8").Activate For Each Query In ws.QueryTables Query.EnableEditing = False Next Next End Sub If anybody can see my blunder I would be really grateful (again!!). Thanks -- Sharon |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
A querytable is completely different from a pivot table.
Look at the PivotTables/PivotCaches. Perhaps set the EnableRefresh property to false. (pivotcache) -- Regards, Tom Ogilvy "Sharon" wrote: Hi I need to ensure that users can't edit the queries underlying pivot tables. I don't want to turn sheet protection on and off as this has caused problems with corrupting the pivots. I am using the following code and it just ain't working: Public Sub ProtectPivots() Dim ws As Worksheet Dim QueryTables As QueryTables Dim Query As QueryTable For Each ws In ActiveWorkbook.Worksheets ws.Activate Range("B8").Activate For Each Query In ws.QueryTables Query.EnableEditing = False Next Next End Sub If anybody can see my blunder I would be really grateful (again!!). Thanks -- Sharon |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tom - I was afraid of that. I don't think that disabling refresh of the
pivotcache will achieve what I need, but I'll try. Thanks again Tom. Regards -- Sharon "Tom Ogilvy" wrote: A querytable is completely different from a pivot table. Look at the PivotTables/PivotCaches. Perhaps set the EnableRefresh property to false. (pivotcache) -- Regards, Tom Ogilvy "Sharon" wrote: Hi I need to ensure that users can't edit the queries underlying pivot tables. I don't want to turn sheet protection on and off as this has caused problems with corrupting the pivots. I am using the following code and it just ain't working: Public Sub ProtectPivots() Dim ws As Worksheet Dim QueryTables As QueryTables Dim Query As QueryTable For Each ws In ActiveWorkbook.Worksheets ws.Activate Range("B8").Activate For Each Query In ws.QueryTables Query.EnableEditing = False Next Next End Sub If anybody can see my blunder I would be really grateful (again!!). Thanks -- Sharon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
PROTECT PIVOT TABLE | Excel Discussion (Misc queries) | |||
Queries on Pivot table | Excel Discussion (Misc queries) | |||
Pivot table with protect workbook | Excel Discussion (Misc queries) | |||
Protect A Pivot Table | Excel Programming | |||
Pivot-table versus crosstab queries | Excel Programming |