Using chartspace in a user form

  • Thread starter Thread starter Ola
  • Start date Start date
O

Ola

Is there anyone who can tell me how to use chartspace in a user form? I
want to use data from an array, which is loaded into memory.

/Ola Eriksson
 
If I use the Picture-method, where do I create the picture when I don´
have any data in a spread sheet? The data I want to use is uploade
from Access and calculated in VBA.

/Ol
 
Look at the office Web components, there is a chart component.

I don't know if it will work with an array, however - you might have to use
the spreadsheet control to place the array first.
 
This macro adds a chart without needing data in the worksheet. You do
need a worksheet....

Sub ChartFromArrays()
Dim myChart As Chart
Set myChart = ActiveSheet.ChartObjects.Add(100, 100, 325, 250).Chart
With myChart
.SeriesCollection.NewSeries
.ChartType = xlXYScatterLines
With .SeriesCollection(1)
.Name = "The Series"
.Values = Array(1, 3, 5, 7, 9)
.XValues = Array(1.5, 2.5, 3.5, 4.5, 5.5)
End With
End With
End Sub

- Jon
 
Back
Top