Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Charts in Excel 97 vs 2000 - don't want pivot!

Status
Not open for further replies.

fuzzword

Programmer
Jul 24, 2001
8
US
I'm having a problem in which a report created in Excel 97, which creates a chart using VBA code and uses data from a pivot table for its source.

The thing is, when it's opened in Excel 2000 (which only a few of our users have), the Chart turns into a PivotChart, and automatically selects TOO MUCH data for its source (it seems to select ALL of the Pivot Table data instead of just the data specified.

here is the line that selcts the data source:

chtGraph.SetSourceData Source:=Sheets _
("Pivot Table").Range( _
"A16,A18:A22,V16:X16,V18:X22"), _
PlotBy:=xlColumns

Instead, it seems to select the entire pivot table as source data, and makes the chart a pivot chart.

Any ideas on how to coreect this - we don't want this to be a pivot chart, but Excel 2000 seems to do this automatically.

Thanks!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top