Im quite new at VBA but I have to solve this.
I guess this is a two part question...
1 I want to create a scatter chart but my source data are in a listbox (-devided in two columns). What code should i write to set the listbox columns as source for the chart?
2 Is it possible to display the chart in the form for example in a frame or a new listbox?
This is my code that obviously doesnt work
ActiveChart.SetSourceData Source = frmTrycklinje.lstCoords
ActiveChart.SeriesCollection(1).XValues = lstCoords.Column(0, ListCount)
ActiveChart.SeriesCollection(1).Values = lstCoords.Column(1, ListCount)
I guess this is a two part question...
1 I want to create a scatter chart but my source data are in a listbox (-devided in two columns). What code should i write to set the listbox columns as source for the chart?
2 Is it possible to display the chart in the form for example in a frame or a new listbox?
This is my code that obviously doesnt work
ActiveChart.SetSourceData Source = frmTrycklinje.lstCoords
ActiveChart.SeriesCollection(1).XValues = lstCoords.Column(0, ListCount)
ActiveChart.SeriesCollection(1).Values = lstCoords.Column(1, ListCount)