Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

listitem error

Status
Not open for further replies.

sanjna000

Programmer
Aug 1, 2003
132
0
0
GB
Hi,
I've got a list view control and i need to add items to this list view. what i did was the following simple code:

Dim list_item As ListItem
Set list_item = LV_Members.ListItems.Add(, , "VBA Testing")
list_item.SmallIcon = 1

But it generated an error stating "Type Mismatch", when initializing list_item. Does anyone know why?

Thanks guys,
Sanjna...
 
The "set" statement worked fine for me. I'm assuming that your listview is named correctly. I did get an imagelist error on the last statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top