Results 1 to 7 of 7

Thread: display listview data in textbox [RESOLVED]

Threaded View

  1. #5
    Giants World Champs!!!! Mark Gambo's Avatar
    Join Date
    Sep 2003
    Location
    Colorado
    Posts
    2,965

    Re: display listview data in textbox

    Quote Originally Posted by Bonkerz
    Sorry should have elaborated on my problem. I want to get values from from the row i selected to 2 textboxes and i need values from 2 columns in the listview.
    Try this:
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim a As Long
    3.  
    4.     With ListView1
    5.         Me.Text1.Item(0).Text = SelectedItem.Text
    6.  
    7.            For a = 1 To .ColumnHeaders.Count - 1
    8.                Me.Text1.Item(a).Text = .SelectedItem.ListSubItems.Item(a).Text
    9.            Next a
    10.  
    11.     End With
    12. End Sub
    Last edited by Mark Gambo; Jun 30th, 2005 at 09:36 AM.
    Regards,

    Mark

    Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width