Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have the ListBox1 in a sheet (My Sheet), that is an embedded control. In
order to fill this listbox I call a sub located in Module1 that is something like this: Public Sub MySub (myListBox as ListBox) myListBox.Clear myListBox.AddItem ("John") myListBox.AddItem ("Bill") myListBox.AddItem ("Paul") End Sub When I call this sub from my sheet I call it like this: Call MySub (Worksheets("My Sheet").ListBox1) I get a Type-Mismatch error. I noticed that the listbox is Null and that the same code works perfectly with a ComboBox instead of the ListBox. Anyone knows I can I workaround this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cannot pass argument from control to sub and back | Excel Programming | |||
Function parameters: trying to pass a control | Excel Programming | |||
Can I pass control to a 2nd workbook | Excel Programming | |||
Unable to pass variable between Userforms | Excel Programming | |||
Application.OnTime -- Unable to Pass Macro with Numeric Parameter | Excel Programming |