![]() |
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? |
Solved it! Thanks anyway!
|
All times are GMT +1. The time now is 12:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com