Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Charts in VBA Code
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Charts in VBA Code
Not really but thanks for the reply. One of my issues is that I am not
quite sure of the most efficient way to do this. I was hoping someone might read my post and confirm that my ideas are in the right direction, or share with me a better way to handle this. I am not quite sure how to deal with the data in a series. It might help to see a code sample of how to do this. I will give the macro recorder a try. Thx. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Charts in VBA Code
Some sample code:
http://support.microsoft.com/default...40&Product=xlw XL97: How To Create a Dynamic Chart Using Visual Basic http://support.microsoft.com/default...80&Product=xlw XL2000: How to Use Visual Basic to Create a Dynamic Chart http://support.microsoft.com/default...55&Product=xlw Using Visual Basic to Create a Chart Using a Dynamic Range Also look at Jon Peltier's site: http://PeltierTech.com/ -- Regards, Tom Ogilvy wrote in message oups.com... Not really but thanks for the reply. One of my issues is that I am not quite sure of the most efficient way to do this. I was hoping someone might read my post and confirm that my ideas are in the right direction, or share with me a better way to handle this. I am not quite sure how to deal with the data in a series. It might help to see a code sample of how to do this. I will give the macro recorder a try. Thx. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Creating Charts in VBA Code
Thanks directing me to some useful information.
Julia Tom Ogilvy wrote: Some sample code: http://support.microsoft.com/default...40&Product=xlw XL97: How To Create a Dynamic Chart Using Visual Basic http://support.microsoft.com/default...80&Product=xlw XL2000: How to Use Visual Basic to Create a Dynamic Chart http://support.microsoft.com/default...55&Product=xlw Using Visual Basic to Create a Chart Using a Dynamic Range Also look at Jon Peltier's site: http://PeltierTech.com/ -- Regards, Tom Ogilvy wrote in message oups.com... Not really but thanks for the reply. One of my issues is that I am not quite sure of the most efficient way to do this. I was hoping someone might read my post and confirm that my ideas are in the right direction, or share with me a better way to handle this. I am not quite sure how to deal with the data in a series. It might help to see a code sample of how to do this. I will give the macro recorder a try. Thx. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Creating charts with VBA code | Charts and Charting in Excel | |||
Creating charts | Excel Discussion (Misc queries) | |||
Creating Charts | Charts and Charting in Excel | |||
Creating organizational charts using VBA code? | Excel Programming |