Creating Charts in VBA Code
wrote in message
oups.com...
I am new to VBA and I have a question related to creating charts. I'd
appreciate any tips on how to accomplish this ... thanks in advance.
I have been trying to accomplish displaying charts by clicking on
Option buttons. And I am still not quite there (some of my solutions
have been very slow, etc.).
I have 5 different charts that I have located the data ranges (but for
3 of the charts the data range is a SERIES) that are needed.
For example I have
2 Pie Charts and the data ranges are in a series
1 Combination Chart
2 Stacked Colum Charts
These all exist now on a worksheet that I will need to get rid of. I
want to click on an option button, and display each chart, and protect
the chart. I will want to display one chart at a time. But since I
will need to specify my data ranges in the code, I am not quite clear
on how this piece of code should flow. Can anyone point me in the
right direction?
Thanks,
Julia
Since you already seem to know how to create charts manually, your best
option is to turn on the macro recorder and then recrate the charts. Use
Tools|Macro|Record new macro. A new window will appear with a stop button
that you must press on when you're done. Using tools|Macro|Macros... you can
view the generated code. I use the Swedish version of Excel so the
translation may not be perfect. Does this answer your question?
/Fredrik
|