LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default Protect Pivot table queries

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
 
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
PROTECT PIVOT TABLE Senzo Excel Discussion (Misc queries) 0 August 2nd 08 09:23 AM
Queries on Pivot table Hari Excel Discussion (Misc queries) 4 June 9th 06 04:01 AM
Pivot table with protect workbook kalz Excel Discussion (Misc queries) 1 March 10th 06 02:58 AM
Protect A Pivot Table Celtic_Avenger[_6_] Excel Programming 1 September 11th 04 03:46 PM
Pivot-table versus crosstab queries Razor[_2_] Excel Programming 1 August 4th 03 03:00 AM


All times are GMT +1. The time now is 11:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"