-
Here is the solution to my problem, thanks to p45cal.
It all works beautifully.
The first peice of code (placed in a module) . . .
Code:
Sub ShowHideWeek(Start, Finish, TBtn)
Application.ScreenUpdating = False
For i = Start To Finish
Worksheets("Day " & i).Visible = CBool(TBtn)
Next i
TBtn.Caption = " Week/" & IIf(TBtn, "Hide", "Show")
Application.ScreenUpdating = True
End Sub
. . .hides and unhides selected tabs based on the following code .
Code:
Private Sub ToggleButton1_Click()
ShowHideWeek 1, 7, ToggleButton1
End Sub
Secondly, the following piece of code (placed in a module) allows you to jump to selected sheets found in a combobox.
Code:
Sub SelectASheet(CmboBox)
Static Blocked
If Blocked Then Exit Sub
Blocked = True
Select Case CmboBox.Value
Case "Current Day"
For Each sht In ThisWorkbook.Sheets
If sht.Range("O2").Value = Date Then
sht.Visible = True
sht.Select
Exit For
End If
Next sht
Case Else
Sheets(CmboBox.Value).Select
End Select
CmboBox.Value = "" ' or "Choose Sheet" or…
Blocked = False
End Sub
Thanks again to p45cal. Your help has been invaluable.