Add sheets that are unhide
Gus,
Here's some code
Private Sub ComboBox1_DropButtonClick()
Dim i As Long
ComboBox1.Clear
With ActiveWorkbook
For i = 1 To .Worksheets.Count
If .Worksheets(i).Visible = True Then
ComboBox1.AddItem .Worksheets(i).Name
End If
Next i
End With
ComboBox1.ListIndex = 0
End Sub
--
HTH
Bob Phillips
"GUS" wrote in message
...
How can we add to a combobox (from controltoolbox toolbar)
all the sheets that are unhide in a workbook.
The code must be placed after combobox1.clear
Private Sub ComboBox1_DropButtonClick()
ComboBox1.Clear
''''code here
ComboBox1.Text = "Go To..."
End Sub
|