smartbuyer
11-28-2013, 04:37 PM
Hi
I have a code that shows all the sheet names in a workbook. How do I exclude the hidden sheets from the combobox list?
Private Sub Userform_Initialize()
Dim sht As Worksheet, txt As String
For Each sht In ActiveWorkbook.Sheets
Me.ComboBox1.AddItem sht.Name
Next sht
End Sub
I have a code that shows all the sheet names in a workbook. How do I exclude the hidden sheets from the combobox list?
Private Sub Userform_Initialize()
Dim sht As Worksheet, txt As String
For Each sht In ActiveWorkbook.Sheets
Me.ComboBox1.AddItem sht.Name
Next sht
End Sub