Switching between two charts based on check / control box

H

Hannes

Hi there,

I please need some support on how can I create a check or control box in a
spreadsheet which allows to switch between two charts.
For instance, checking shows chart A at the specific location in the
spreadsheet, unchecking shows chart B at the same location.

Many thanks for support.
 
J

joel

Place both charts ontop of each other. Then depending on which chec
box is active move one chart to the from of the other. You can als
make one invisible.so the edges don't show. Or even use the opaqu
setting
 
P

Patrick Molloy

using a FORMs checkbox, I have C3 as the linked cell and I set the control to
run this macro:

Option Explicit

Sub ShowChart()
Dim ch1 As ChartObject
Dim ch2 As ChartObject
Set ch1 = ActiveSheet.ChartObjects("Chart 1")
Set ch2 = ActiveSheet.ChartObjects("Chart 2")
ch1.Visible = Range("C3")
ch2.Visible = Not ch1.Visible
End Sub
 
Top