Add sheets that are unhide
Oops, you say from the controltoolbox toolbar
ComboBox1.Clear For Each ws In ActiveWorkbook.Sheets If ws.Visible = True Then ComboBox1.AddItem (ws.Name) End If Next ws -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Ron de Bruin" wrote in message ... Try something like this For Each ws In ActiveWorkbook.Sheets If ws.Visible = True Then Userform1.Combobox1.AddItem (ws.Name) End If Next ws -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "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 |
All times are GMT +1. The time now is 05:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com