Referencing Listbox on Worksheet

  • Thread starter Thread starter The Vision Thing
  • Start date Start date
T

The Vision Thing

I've inserted a listbox called 'listcategory' directly onto a worksheet
called 'test'. I'm trying to programmatically add items to this listbox
using the following code but I get an 'Object Required' error message:

With Worksheets("test")
ListCategory.Clear
ListCategory.additem("wayne")
End With

How do I reference this listbox in Excel VBA?

Thanks,
Wayne C.
 
Wayne,

Is this exactly the code you're using?? If so, you're missing a period
before each "ListCategory" reference.

Stan Scott
New York City
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top