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: 709
Default select range for pivot table command

I need to select range for pivot table command.

If I select a range and then record a macro I get this for the pivot command:
ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _
"TempEC!R1C1:R229C50").CreatePivotTable TableDestination:="",
TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10

Now I need to put a similar pivot table command into a macro program, and I
don't know how to reference the SourceData in the pivot command.

I tried using the name of a range I defined earlier in the macro, but get an
error.
I also tried using RC notation given the row and column size of the
datasource.




--
Richard
 
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
AUTO SELECT A RANGE FOR PIVOT TABLE SSJ New Users to Excel 1 December 24th 07 02:46 PM
Pivot Table Error Message - "Command Text not set for command obje Jeff Divian Excel Discussion (Misc queries) 0 November 7th 07 10:26 PM
Using cursor keys to select Pivot Table Source Data Range GuitrDad Excel Discussion (Misc queries) 0 September 12th 07 06:20 PM
Pivot Table Select Range of Value pa32rt300t Excel Programming 0 March 15th 05 03:11 AM
How to select range of values in pivot table? RADO Excel Programming 1 October 9th 03 09:00 AM


All times are GMT +1. The time now is 09:52 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"