SteveInAlabama
Board Regular
- Joined
- Aug 22, 2002
- Messages
- 94
In one module, I declare an array using:
Global ADWgtXBar as variant.
Then I fill the array. OK, everything is fine. I can see values in my array.
In a different module, with no parameters passed, I can still see individula elements of this array. Then I do the following:
Set oCht = Worksheets("Entry Form").ChartObjects("Chart 2").Chart
With oCht
'.SeriesCollection(1).Values = ADWgtXBar 'this will NOT work - error says Unable to set the Values Prop of the Series Class.
.SeriesCollection(1).Values = Array(ADWgtXBar(1), ADWgtXBar(2)) 'This works fine
End With
I want the whole array in the series (up to 70 points) so the second line is impractical. Why won't the array pass as an array, and what syntax would work?
Thanks in advance.
Steve
Global ADWgtXBar as variant.
Then I fill the array. OK, everything is fine. I can see values in my array.
In a different module, with no parameters passed, I can still see individula elements of this array. Then I do the following:
Set oCht = Worksheets("Entry Form").ChartObjects("Chart 2").Chart
With oCht
'.SeriesCollection(1).Values = ADWgtXBar 'this will NOT work - error says Unable to set the Values Prop of the Series Class.
.SeriesCollection(1).Values = Array(ADWgtXBar(1), ADWgtXBar(2)) 'This works fine
End With
I want the whole array in the series (up to 70 points) so the second line is impractical. Why won't the array pass as an array, and what syntax would work?
Thanks in advance.
Steve