Home |
Search |
Today's Posts |
#1
|
|||
|
|||
ListBox, error 424
Hi!
I´m trying to add items to a list box, using the following code: Code: ListBox1.Clear While Not recordsetSales.EOF ListBox1.AddItem (recordsetSales.Fields("product")) recordsetSales.MoveNext Wend The problem is that I get 'Error 424: Object required', and I can´t figure out why. Any help appreciated! Thanks! Edit: I want this code to be executed when the Excel document opens, and have therfore out it in ThisWorkbook under the sub Workbook_Open(). If I use the same code on a CommandButton_click it works. Do I have to specify in which sheet the listbox is situated or something? Last edited by coldmejl : June 14th 05 at 09:52 AM |
#2
|
|||
|
|||
Solved it! Thanks anyway!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help! Activate worksheet from a listbox | Excel Worksheet Functions | |||
Listbox | New Users to Excel | |||
Listbox or Combo advise | Excel Worksheet Functions | |||
How do I return the unique entries from a column to a listbox | Excel Worksheet Functions | |||
Inputbox with Listbox | Excel Discussion (Misc queries) |