Heres my code for the buttons.
Private Sub Calendar1_Click()
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
End Sub
Private Sub ToggleButton2_Click()
Dim bool As Boolean
bool = ToggleButton2.Value
If bool Then
ToggleButton2.Caption = "TEG - Show Data"
Else
ToggleButton2.Caption = "TEG - Hide Data"
End If
Columns("s:al").EntireColumn.Hidden = bool
End Sub
Private Sub ToggleButton3_Click()
Dim bool As Boolean
bool = ToggleButton3.Value
If bool Then
ToggleButton3.Caption = "Drumming Data - Show"
Else
ToggleButton3.Caption = "Drumming Data - Hide"
End If
Columns("am:av").EntireColumn.Hidden = bool
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Application.Intersect(Range("C:D"), Target) Is Nothing Then
Calendar1.Left = Target.Left + Target.Width - Calendar1.Width
Calendar1.Top = Target.Top + Target.Height
Calendar1.Visible = True
' select Today's date in the Calendar
Calendar1.Value = Date
ElseIf Calendar1.Visible Then Calendar1.Visible = False
End If
End Sub
Private Sub ToggleButton1_Click()
Dim bool As Boolean
bool = ToggleButton1.Value
If bool Then
ToggleButton1.Caption = "Refinery - Show Data"
Else
ToggleButton1.Caption = "Refinery - Hide Data"
End If
Columns("f:g").EntireColumn.Hidden = bool
Columns("j:l").EntireColumn.Hidden = bool
Columns("n

").EntireColumn.Hidden = bool
End Sub