Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You have really got me intrigued now since you say that it sometimes works.
How can you set a series collection in a chart to a variable which disappears once the macro has finished running? I would have thought that it must always be a range on a worksheet. I think that you might have to find a way of saving the range and resetting the source data range. Regards, OssieMac "matelot" wrote: Thanks for the reply. I tried both responses with having the chart active right before the line Activechart.seriescollection(i).values = array(inArray) and having just ...values=inArray. I still get the same error. Even when debugging, I even manually activate the chart and it still gives me the error message. What I am trying to do is when a user unchecks the box, the line graph is hidden (set to 0) and when it is checked, I reassign the series values back to the array stored before it was set to 0. can you give any other pointer? Thanks so much. You guys have been of great help. "Dave Peterson" wrote: Since inArray is already an array, would this work? ActiveChart.SeriesCollection(i).Values = inArray (untested) 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. -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
replace VBA run-time error message with custom message | Excel Programming | |||
error message: compile error, argument not optional | Excel Programming | |||
Excel XP error message Run Time Error 91 | Excel Programming | |||
changing the message in an error message | Excel Worksheet Functions | |||
How do I get rid of "Compile error in hidden module" error message | Excel Discussion (Misc queries) |