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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListView Columns

Status
Not open for further replies.

Jason92

IS-IT--Management
Feb 6, 2006
5
US
I have a form with a listview in it. I want the values of every column for the itemselected to show up in a message box when the item is double clicked.

So far, I can only get the value in column 1 to show up:

Private Sub ListView1_dblclick()
MsgBox ListView1.SelectedItem
End Sub

How do I reference the other columns?
 
Hi

Dim Item As Variant

For Each Item In List0.ItemsSelected
Debug.Print List0.ItemData(Item)
Next Item

This should print out all the Items in the first column that are selected, you can adapt this to your needs.

Dim BiGString as String
Dim Item As Variant
BigString = ""
For Each Item In List0.ItemsSelected
BigString = BigString & List0.ItemData(Item) & " "
Next Item

for example.



Hope this helps!

Regards

BuilderSpec
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top