ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Displaying XValues and Values for chart using VBA (https://www.excelbanter.com/charts-charting-excel/64937-displaying-xvalues-values-chart-using-vba.html)

Barb Reinhardt

Displaying XValues and Values for chart using VBA
 
Let's say I have the following

ActiveChart.SeriesCollection(1).XValues = "B2:B20"
ActiveChart.SeriesCollection(1).Values = "D2:D20"

How do I go about extracting the XValues and Values so that I can display
"B2:B20" and "D2:D20" in VBA. I've got

xval = activechart.seriescollection(1).Xvalues

xval is currently defined as a string. When I run, I get a run time error
'13' Type mismatch.

Thanks,
Barb

Thanks in advance.

Tushar Mehta

Displaying XValues and Values for chart using VBA
 
Hi Barb,

Like I implied in the other discussion, the only way to do this is to
parse the SERIES formula. The link I provided to Walkenbach's code
encapsulates the work in a class module.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Let's say I have the following

ActiveChart.SeriesCollection(1).XValues = "B2:B20"
ActiveChart.SeriesCollection(1).Values = "D2:D20"

How do I go about extracting the XValues and Values so that I can display
"B2:B20" and "D2:D20" in VBA. I've got

xval = activechart.seriescollection(1).Xvalues

xval is currently defined as a string. When I run, I get a run time error
'13' Type mismatch.

Thanks,
Barb

Thanks in advance.


Barb Reinhardt

Displaying XValues and Values for chart using VBA
 
Thanks.
"Tushar Mehta" wrote in message
om...
Hi Barb,

Like I implied in the other discussion, the only way to do this is to
parse the SERIES formula. The link I provided to Walkenbach's code
encapsulates the work in a class module.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...
Let's say I have the following

ActiveChart.SeriesCollection(1).XValues = "B2:B20"
ActiveChart.SeriesCollection(1).Values = "D2:D20"

How do I go about extracting the XValues and Values so that I can display
"B2:B20" and "D2:D20" in VBA. I've got

xval = activechart.seriescollection(1).Xvalues

xval is currently defined as a string. When I run, I get a run time
error
'13' Type mismatch.

Thanks,
Barb

Thanks in advance.





All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com