Thread: Dynamic graph
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
SteveM SteveM is offline
external usenet poster
 
Posts: 133
Default Dynamic graph

On Nov 21, 9:01 am, TFriis wrote:
Hi Excel Gurus.

I would like to make a dynamic graph-plot - the dynamic part consists
of buttons next to the graph plot, where you can turn certain plots
"on and off".

As I vision it the sheet would count number of series (these are
already dynamic), then create -according to the number of series-
buttons for the graph, and name the buttons according to the name of
the reference series.

When you click the buttons, the plot should update and either add or
remove the specific set of series. (preferably without an extra update
button).

Any input would be great, since this is a bigger project :)


Charts are complex objects with many properties. The easiest way to
customize one with VBA is to create what you want the chart to look
like manually first but with the Macro recorder on. You probably want
to select the maximum number of series that would actually be needed
so you can deselect some with logical IF's. Then use the Macro code
as a template for your customization by replacing selected static
parameters with variables and ranges that you collect either directly
or indirectly from the user via a dialog box or something.

BTW, use range Names rather than cell addresses for the series. Then
you can modify a range's dimensions without having to explicitly
update the code.

SteveM