Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Pivot Tables: Alternative to PivotSelect?

Hi guys

In VBA, we're accustomed to referencing ranges rather than selecting
them (which is of course what the macro recorder does). However, when
referencing ranges within a PivotTable, I don't seem to be able to
avoid PivotSelect and am wondering if there is one.

For example, in the following code, I am trying to format the total
columns of a ColumnField (pt is a declared PivotTable)

pt.PivotSelect "CategoryDemand[All;Total]", xlDataAndLabel, True
Selection.Interior.ColorIndex = 43
Selection.Font.Bold = True

So my question is, can I reference this range and format it, avoiding
PivotSelect?

Thanks in advance

Paul Martin
Melbourne, Australia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 133
Default Pivot Tables: Alternative to PivotSelect?

I'm still looking for an answer, even if it's "no, you can't do it".


On Oct 8, 12:13*pm, Paul Martin wrote:
Hi guys

In VBA, we're accustomed to referencing ranges rather than selecting
them (which is of course what the macro recorder does). *However, when
referencing ranges within a PivotTable, I don't seem to be able to
avoid PivotSelect and am wondering if there is one.

For example, in the following code, I am trying to format the total
columns of a ColumnField (pt is a declared PivotTable)

* * pt.PivotSelect "CategoryDemand[All;Total]", xlDataAndLabel, True
* * Selection.Interior.ColorIndex = 43
* * Selection.Font.Bold = True

So my question is, can I reference this range and format it, avoiding
PivotSelect?

Thanks in advance

Paul Martin
Melbourne, Australia


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
Building pivot tables in Excel 2007 based on existing pivot tables? [email protected] Excel Discussion (Misc queries) 4 December 26th 07 08:05 PM
(Tom?) Pivot tables, code to refer to all pivot tables on template klysell Excel Programming 0 July 20th 07 09:32 PM
pivot tables: pivotselect with a very large table [email protected] Excel Programming 0 March 15th 07 04:14 PM
PivotSelect MCyn Excel Programming 1 March 8th 06 02:46 AM
Pivot tables-controlling user interaction with pivot tables Sindhura Excel Programming 0 August 27th 03 02:10 PM


All times are GMT +1. The time now is 04:48 PM.

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"