Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Private Sub ComboBox1_Change()
If ActiveX_Event_Disabled Then Exit Sub
ActivateSheet
End Sub
Private Sub ComboBox2_Change()
If ActiveX_Event_Disabled Then Exit Sub
ActivateSheet
End Sub
Public ActiveX_Event_Disabled As Boolean
Sub ActivateSheet()
Dim SheetName As String
On Error Resume Next
With Worksheets("Main")
If (.OLEObjects("ComboBox1").Object.ListIndex = -1) Or (.OLEObjects("ComboBox2").Object.ListIndex = -1) Then
Exit Sub
End If
With .OLEObjects("ComboBox2").Object
SheetName = .List(.ListIndex)
End With
With .OLEObjects("ComboBox1").Object
SheetName = SheetName & " " & .List(.ListIndex)
End With
ActiveX_Event_Disabled = True
.OLEObjects("ComboBox1").Object.ListIndex = -1
.OLEObjects("ComboBox2").Object.ListIndex = -1
ActiveX_Event_Disabled = False
End With
Worksheets(SheetName).Activate
End Sub
ActiveX_Event_Disabled
Application.EnableEvents = False