Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2006, 04:20 PM
Registered User
 
Join Date: May 2004
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to select an item from listview


hai friends,

Can anybody tell me how do we select an item from listview and store in a declared variable?

thanx
joseph
 
Old April 24th, 2006, 11:33 AM
Authorized User
 
Join Date: Mar 2006
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Raghunathan
Default

hi,

here is the sample code for the operation you are trying.
hope this code would help u solve problems

Dim lstSelectedItem As ListItem
Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
Set lstSelectedItem = Item
MsgBox lstSelectedItem.Text
End Sub



Regards,
Raghu





Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate ListView From ComboBox Select eusanpe C# 4 August 20th, 2007 06:49 PM
How to get selected item from listview? try.test.abc C# 1 January 4th, 2007 02:34 AM
help coloring individual listview item instead al method Visual C++ 1 August 1st, 2006 08:25 AM
problem selecting listview item method Visual C++ 0 July 7th, 2006 04:06 PM
Selecting a ListView item bmains Pro VB.NET 2002/2003 0 January 22nd, 2005 11:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.