Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating combox with worksheet names
Hi
I'm using the following to populate a combobox on a worksheet with the names of all the worksheets in the workbook:- Dim ws As Integer With frmMenu.cbStartUpWorksheet For ws = 1 To Sheets.Count ..AddItem Sheets(ws).Name Next End With My question is I have one worksheet that is veryhidden and I dont want it to show in the combobox. How do I do this? Cheers |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating combox with worksheet names
Use the .Visible property which list out xlSheetHidden, xlSheetVeryHidden and
xlSheetVisible.... Private Sub CommandButton1_Click() Dim ws As Worksheet With frmMenu.cbStartUpWorksheet For Each ws In Worksheets If ws.Visible < xlSheetVeryHidden Then .AddItem ws.Name Next End With End Sub -- Jacob (MVP - Excel) "Martin Parker" wrote: Hi I'm using the following to populate a combobox on a worksheet with the names of all the worksheets in the workbook:- Dim ws As Integer With frmMenu.cbStartUpWorksheet For ws = 1 To Sheets.Count .AddItem Sheets(ws).Name Next End With My question is I have one worksheet that is veryhidden and I dont want it to show in the combobox. How do I do this? Cheers |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Populating combox with worksheet names
Thank you Jacob, worked great. I have slightly amended to code to only load
visible worksheets into the combobox. Cheers Martin "Jacob Skaria" wrote: Use the .Visible property which list out xlSheetHidden, xlSheetVeryHidden and xlSheetVisible.... Private Sub CommandButton1_Click() Dim ws As Worksheet With frmMenu.cbStartUpWorksheet For Each ws In Worksheets If ws.Visible < xlSheetVeryHidden Then .AddItem ws.Name Next End With End Sub -- Jacob (MVP - Excel) "Martin Parker" wrote: Hi I'm using the following to populate a combobox on a worksheet with the names of all the worksheets in the workbook:- Dim ws As Integer With frmMenu.cbStartUpWorksheet For ws = 1 To Sheets.Count .AddItem Sheets(ws).Name Next End With My question is I have one worksheet that is veryhidden and I dont want it to show in the combobox. How do I do this? Cheers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Populating List box with tab/worksheet names | Excel Programming | |||
Populating listbox with sheet names | Excel Discussion (Misc queries) | |||
Populating ComboBox with Folder Names | Excel Programming | |||
Populating work sheet combox with another work sheet values | Excel Discussion (Misc queries) | |||
Populating Userform ComboBox with worksheet names in XL2003 | Excel Programming |