Hello People,
Need Some Help ! Suppose I have 20 Worksheet....I want to Navigate & display only 15 Sheets with using Combo Box , I have tried the below Code Given by a user in other thread....But it displays all Sheets ....A neewbie here ... Since I require only particular Sheet to Navigate...Thank You .....
Private Sub ComboBox1_Change()
If ComboBox1.ListIndex > -1 Then Sheets(ComboBox1.Text).Select
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim xSheet As Worksheet
On Error Resume Next
Application.ScreenUpdating = False
Application.EnableEvents = False
If ComboBox1.ListCount <> ThisWorkbook.Sheets.Count Then
ComboBox1.Clear
For Each xSheet In ThisWorkbook.Sheets
If xSheet.Visible = xlSheetVisible Then ComboBox1.AddItem xSheet.Name
Next xSheet
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub ComboBox1_GotFocus()
If ComboBox1.ListCount <> 0 Then ComboBox1.DropDown
End Sub
Need Some Help ! Suppose I have 20 Worksheet....I want to Navigate & display only 15 Sheets with using Combo Box , I have tried the below Code Given by a user in other thread....But it displays all Sheets ....A neewbie here ... Since I require only particular Sheet to Navigate...Thank You .....
Private Sub ComboBox1_Change()
If ComboBox1.ListIndex > -1 Then Sheets(ComboBox1.Text).Select
End Sub
Private Sub ComboBox1_DropButtonClick()
Dim xSheet As Worksheet
On Error Resume Next
Application.ScreenUpdating = False
Application.EnableEvents = False
If ComboBox1.ListCount <> ThisWorkbook.Sheets.Count Then
ComboBox1.Clear
For Each xSheet In ThisWorkbook.Sheets
If xSheet.Visible = xlSheetVisible Then ComboBox1.AddItem xSheet.Name
Next xSheet
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub ComboBox1_GotFocus()
If ComboBox1.ListCount <> 0 Then ComboBox1.DropDown
End Sub