View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default Help with this error message

When things like this occur intermittently, it is sometimes due to some other
action occurring. In this case, the first thing that you should check is that
the chart is in fact active because something else might be causing it to
loose the focus and then the ActiveChart part is no longer valid.

Regards,

OssieMac


"matelot" wrote:

Hi,
I have a macro that update the seriescollection values based on a checkbox.
If it's true it calls the following code and false it replaces the inArray
to a range with "0" value.
inArray = Range("A2:D2").Value
ActiveChart.SeriesCollection(i).Values = array(inArray)
It worked at 1 point and now I get this error "Error 1004 - unable to set
the values property of the series class". So I convert the 2 dim array into 1
dim and assign the 1 dim array into Activechart.seriescollection.values. The
problem is that the first time it works fine but after that, I get the same
error message.
Pls help.