Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Charting / August 2006

Tip: Looking for answers? Try searching our database.

Setting up Macro to create pie chart.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Hamish - 08 Aug 2006 13:23 GMT
I need to create a macro to make pie charts. I have about 15 pie charts to
make and I would like them all to be the same. They use different data though.

I have created a macro which works successfully for one graph.

However I cant select different data. The macro always creates a chart from
the data used to record the macro.

Is there a way we can select which data we want to use, then get the macro
to make a graph representing that data?
Hamish - 08 Aug 2006 13:27 GMT
> I need to create a macro to make pie charts. I have about 15 pie charts to
> make and I would like them all to be the same. They use different data though.
[quoted text clipped - 6 lines]
> Is there a way we can select which data we want to use, then get the macro
> to make a graph representing that data?

Never mind. I realised that I could just right click the chart and change
the data range. This makes it pretty easy.
Will.Cairns@gmail.com - 08 Aug 2006 14:30 GMT
Hamish..The recorded macro and the real VBA to create charts varies in
a few distinct methods. I have found the need to do very much the same
process that you are taking on now. My chart parameters (Type, Ranges,
Collection pointers, Axis settings) are all stored in 1 worksheet named
"Chart_Control" I then gather all elements into a group of arrays and
loop into my chart subroutine.. this works remarkably well and I would
be happy to give you guidance should you choose to go down the
programming path as opposed to your current method.

> > I need to create a macro to make pie charts. I have about 15 pie charts to
> > make and I would like them all to be the same. They use different data though.
[quoted text clipped - 9 lines]
> Never mind. I realised that I could just right click the chart and change
> the data range. This makes it pretty easy.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.