I am new to Excel VBA, and I am trying to solve this problem with VBA code.
Basically, my sheet has 12 charts and 12 tables. At any given time, only one table will get data and only that graph should be seen. The other 11 graphs should be hidden.
I have tried this
Sub getchart()
If Range("C1") = Vub Then
ActiveSheet.ChartObjects("Chart_33").Visible = True
Else
ActiveSheet.ChartObjects("Chart_33").Visible = False
End If
End Sub

