Hi all,
I've got the below code running in my dashboard tab:
The only other bit of VB is in the worksheet to hide the ribbon:
Any help would be greatly appreciated....
I've got the below code running in my dashboard tab:
Code:
Sub chart_visibility()
ActiveWorkbook.Sheets("Dashboard").Activate
If Range("A1").Value = "1" Then
ActiveSheet.ChartObjects("Chart 3").Visible = False
ActiveSheet.ChartObjects("Chart 1").Visible = False
ActiveSheet.Shapes("TextBox 12").Visible = False
ActiveSheet.Shapes("TextBox 13").Visible = False
ActiveSheet.Shapes("TextBox 14").Visible = False
ActiveSheet.Shapes("TextBox 15").Visible = False
ActiveSheet.Shapes("TextBox 16").Visible = False
ActiveSheet.Shapes("TextBox 17").Visible = False
ActiveSheet.Shapes("TextBox 8").Visible = False
ActiveSheet.Shapes("TextBox 5").Visible = True
Rows("18:31").EntireRow.Hidden = True
Else
ActiveSheet.ChartObjects("Chart 3").Visible = True
ActiveSheet.ChartObjects("Chart 1").Visible = True
ActiveSheet.Shapes("TextBox 12").Visible = True
ActiveSheet.Shapes("TextBox 13").Visible = True
ActiveSheet.Shapes("TextBox 14").Visible = True
ActiveSheet.Shapes("TextBox 15").Visible = True
ActiveSheet.Shapes("TextBox 16").Visible = True
ActiveSheet.Shapes("TextBox 17").Visible = True
ActiveSheet.Shapes("TextBox 8").Visible = True
ActiveSheet.Shapes("TextBox 5").Visible = False
Rows("18:31").EntireRow.Hidden = False
End If
End Sub
Private Sub Worksheet_Calculate()
Static OldVal As Variant
If Range("A1").Value <> OldVal Then
OldVal = Range("A1").Value
Call Sheet4.chart_visibility <------ This row is highlighted on debug.
End If
End Sub
The only other bit of VB is in the worksheet to hide the ribbon:
Code:
Private Sub Workbook_Open()
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",true)"
End Sub
Any help would be greatly appreciated....
Last edited by a moderator: