Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setup ComboBox when open workbook
Hi,
I want to fill a ComboBox with items when I open the Workbook. But I don't want to take the items from cells in the worksheet. So I tried these lines: Private Sub Workbook_Open() ComboBox1.List = Array("First", "Second", "Third", "Forth") End Sub But this does not work. What is missing. Thanks in advance, /Sören |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setup ComboBox when open workbook
It probably doesn't know where the combo box is
Private Sub Workbook_Open() Worksheets("Sheet1").ComboBox1.List = Array("Item1", "Item2", "Item3") End Sub "Sören_Marodören" wrote: Hi, I want to fill a ComboBox with items when I open the Workbook. But I don't want to take the items from cells in the worksheet. So I tried these lines: Private Sub Workbook_Open() ComboBox1.List = Array("First", "Second", "Third", "Forth") End Sub But this does not work. What is missing. Thanks in advance, /Sören |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setup ComboBox when open workbook
Hi Soren
If your combobox is located on sheet1 say, then try prefixing the combobox statement with the location ie: Private Sub Workbook_Open() Sheets("Sheet1").ComboBox1.List = Array("First", "Second", "Third", "Forth") End Sub Hope this helps! Richard On 31 Jan, 08:53, Sören_Marodören wrote: Hi, I want to fill a ComboBox with items when I open the Workbook. But I don't want to take the items from cells in the worksheet. So I tried these lines: Private Sub Workbook_Open() ComboBox1.List = Array("First", "Second", "Third", "Forth") End Sub But this does not work. What is missing. Thanks in advance, /Sören |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to setup Excel Template to open in Outlook 2003 in body | Setting up and Configuration of Excel | |||
Error 1402. Setup cannot open the registry key. | Excel Discussion (Misc queries) | |||
Print setup of a complete workbook | Excel Discussion (Misc queries) | |||
Define Page Setup for whole workbook | Excel Programming | |||
Workbook window setup | Excel Programming |