Results 1 to 12 of 12

Thread: Display Listbox item's description in a Textbox [Resolved]

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2004
    Posts
    29

    Display Listbox item's description in a Textbox [Resolved]

    Hi all, I'm new to VB and this is my question:

    I have a list box where the user select an item from the list box, and the description of the item will be display in a text box.
    Different item will display different description in the same text box. How can I do this?

    I've been trying by using this code:
    VB Code:
    1. Private Sub List1_Click()
    2.     Select Case List1.ListIndex
    3.        Case 0:
    4.            Text1.Text = "A Description"
    5.        Case 1:
    6.            Text1.Text = "B Description"
    7.        Case 2:
    8.            Text1.Text = "C Description"    
    9.     End Select
    10. End Sub

    But the description is very long (more than hundreds words), I tried to store it in an access database, but failed because text size too large. Is it possible to save the description in a .txt file and load the description from that .txt file into the text box?

    Thanks in advance!
    Last edited by hbin; Aug 25th, 2004 at 10:59 AM.

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