Results 1 to 3 of 3

Thread: Someone help me with my listbox/textbox dilemna's?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    17

    Question

    I need to find a way to either put the text content of my listbox into a text file or ad lines to a text box with erasing the current content. Thanx.....

  2. #2
    Guest
    To put a ListBox's contents in a TextBox.
    Code:
    For I = 0 To List1.ListCount - 1
        Text1 = Text1 & vbNewLine & List1.List(I)
    Next I
    To add new new line to a TextBox, add a vbNewLine.
    Code:
    Text1 = Text1 & vbNewLine

  3. #3
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    /// example ///

    Private Sub Form_Load()
    For i = 1 To 10
    List1.AddItem i
    Next i
    Text1.Text = ""
    End Sub

    Private Sub List1_Click()

    Text1.Text = Text1.Text & List1.Text & vbCrLf
    List1.RemoveItem List1.ListIndex

    End Sub
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

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