Referencing Listbox on Worksheet

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.
 
S

Stan Scott

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
 
Top