Re: Using other than Range as SetSourceData method argument
From: Jon Peltier (DOjonNOTxlmvp_at_SPAMpeltiertechME.com)
Date: 09/14/04
- Next message: Jon Peltier: "Re: Need help using both Bar Graph and XY scatter"
- Previous message: Jon Peltier: "Re: Deactivate"
- In reply to: CKa: "Using other than Range as SetSourceData method argument"
- Next in thread: CKa: "Re: Using other than Range as SetSourceData method argument"
- Reply: CKa: "Re: Using other than Range as SetSourceData method argument"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 14 Sep 2004 13:48:23 -0400
It takes a little more work. In VBA, set up the X and Y value arrays for
each series. Then add the series one by one:
Dim Srs as Series
With ActiveChart.SeriesCollection
Set Srs = .NewSeries
With Srs
.Values = Yarray
.XValues = Xarray
End With
End With
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
CKa wrote:
> Hi.
>
> I have been trying to find another way to populate a chart in some VBA code
> than using a range as a argument for the SetSourceData method of the Chart
> object.
>
> I get a lot of external data (from a database) into an array of 2 dimensions
> (x and y). Is it possible to use this array to as a datasource without first
> having to populate some cells with the array and then use these cells as a
> Range property for populating a chart?
>
> Thanks in advance,
>
> CKa.
>
>
- Next message: Jon Peltier: "Re: Need help using both Bar Graph and XY scatter"
- Previous message: Jon Peltier: "Re: Deactivate"
- In reply to: CKa: "Using other than Range as SetSourceData method argument"
- Next in thread: CKa: "Re: Using other than Range as SetSourceData method argument"
- Reply: CKa: "Re: Using other than Range as SetSourceData method argument"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|