using macros to draw charts

  • Thread starter Thread starter josie
  • Start date Start date
J

josie

I'm trying to write a simple macro which draws a bubble
chart using a few cells of data from a worksheet. I
designed the chart from data on the worksheet while
recording, then got rid of the chart and ran the macro. No
joy. It's stopping on the first line after Charts.Add -

ActiveChart.ChartType = xlBubble

and I don't understand why!

Anyone got any bright ideas?
 
Hi Josie -

It's not your fault. In a few cases, the macro recorder gets confused and writes down the steps
out of order. For some types of chart it doesn't matter, but for bubble charts, you have to use
ActiveChart.SetSourceData before ActiveChart.ChartType = xlBubble.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
 
Back
Top