Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 23rd, 2006, 04:20 PM
Registered User
 
Join Date: May 2004
Location: Queens, NY, USA.
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
Reply With Quote
  #2 (permalink)  
Old April 24th, 2006, 11:33 AM
Authorized User
 
Join Date: Mar 2006
Location: Chennai, Tamil Nadu, India.
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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

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 01: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 10:19 PM



All times are GMT -4. The time now is 06:30 AM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.