using macros to draw charts

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?
 
J

Jon Peltier

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/
_______
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top