V
Viktor Ygdorff
My macro reads inputs from the user, uses this input to search a spreadsheet
for existing info and then update charts with the info from the spreadsheet.
It all works fine. My problem is that when updating the charts it is not
enough to simply write:
ActiveChart.SeriesCollection(varWorksheetInfoArray(k)).Values =
Sheets(varWorksheetInfoArray(0)).Range(rng(k).Offset(i, 0).Address & ":" &
rng(k).Offset(j, 0).Address)
(do not care about the variables etc.) That is declareing the range for a
series does not automatically mean that you get that series. If e.g. the
chart already has a series and the x-axis and the y-series are not equally
long Excel presses data together so that giving new ranges to both x-axis and
y-series does not imply that these are the series that you actually get. Now
this causes some major problems for since I must let the user modify the
charts in order to e.g. evaluate different scenarios. However once the user
has done that my program is busted since the series that my program sets will
not necessarily be displayed in the chart. Is there any way of solving this?
I have tried with deleting existing series and then adding new ones again but
that gave me some headache also.. Thus if anyone has any clue about this
please help me out! Thank you very much. I am grateful for any help that I
get.
Ygdorff
for existing info and then update charts with the info from the spreadsheet.
It all works fine. My problem is that when updating the charts it is not
enough to simply write:
ActiveChart.SeriesCollection(varWorksheetInfoArray(k)).Values =
Sheets(varWorksheetInfoArray(0)).Range(rng(k).Offset(i, 0).Address & ":" &
rng(k).Offset(j, 0).Address)
(do not care about the variables etc.) That is declareing the range for a
series does not automatically mean that you get that series. If e.g. the
chart already has a series and the x-axis and the y-series are not equally
long Excel presses data together so that giving new ranges to both x-axis and
y-series does not imply that these are the series that you actually get. Now
this causes some major problems for since I must let the user modify the
charts in order to e.g. evaluate different scenarios. However once the user
has done that my program is busted since the series that my program sets will
not necessarily be displayed in the chart. Is there any way of solving this?
I have tried with deleting existing series and then adding new ones again but
that gave me some headache also.. Thus if anyone has any clue about this
please help me out! Thank you very much. I am grateful for any help that I
get.
Ygdorff