Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Referencing Listbox on Worksheet

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.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Referencing Listbox on Worksheet

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

"The Vision Thing" wrote in message
...
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.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CountIF() in Worksheet B while referencing cells in Worksheet A jfj3rd Excel Worksheet Functions 3 April 14th 06 11:24 PM
CountIF() in Worksheet B while referencing cells in Worksheet A jfj3rd Excel Worksheet Functions 3 April 14th 06 07:36 PM
Help! Activate worksheet from a listbox Bob Phillips Excel Worksheet Functions 0 May 18th 05 09:09 AM
How access a listbox on a worksheet AsIs Excel Programming 6 June 21st 04 03:43 AM
listbox.value not equal to listbox.list(listbox.listindex,0) ARB Excel Programming 0 October 22nd 03 12:46 AM


All times are GMT +1. The time now is 09:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"