Using VBA to update Chart Sheet formats and axis titles

  • Thread starter Thread starter terryspencer2003
  • Start date Start date
T

terryspencer2003

I have a chart (ChartSheet1)which populates based on a drop down box.
The drop down box sends a variable to Sheet2. Chartsheet1 range feeds
from Sheet2 based on this variable.

How do I use a WorkSheet_Change event to track the change in the
variable in Sheet2 so that I can modify the formats and title of my
chart?

RK
 
Change doesn't fire on a change caused by a calculation. The calculate
event would, but does't identify what triggered the caculation or what has
changed. You would need to store the value and compare it to the current
value to determine if the value has changed.

The Change event fires when a manual or a DDE change is made to the cell.
 
You don't need VBA change chart data or titles with a worksheet control.
Use controls from the Forms toolbar, and use the cell link value as a
parameter in a dynamic range definition. Then use this dynamic range in
the chart source data or in the cell that the chart or axis title is
linked to. Here is a page with hints about this:

http://peltiertech.com/Excel/Charts/Dynamics.html

- Jon
 
.... pressed Send too soon.

You can use a control to run a macro. Right click on a Forms toolbar
control and select Assign Macro from the pop up menu. Right click on the
Control Toolbox control and select View Code, then use the right hand
dropdown at the top of the code window in the VB Editor to select the
event you want to fire.

- Jon
 
Back
Top