Results 1 to 15 of 15

Thread: Find a name from a list of names

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    It's nice to hear you have it all under control.
    Change the code you have for ListBox1 to this.


    Private Sub ListBox1_Click()
        Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(1) = ListBox1
        Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Offset(, 1) = ListBox1.Column(1, Me.ListBox1.ListIndex)
        TextBox1.SetFocus
        ListBox1.Clear
        TextBox1 = ""
    End Sub
    The
    ListBox1.Clear
    is not required I think. Try it with it and without it

    BTW, where are you in Spain. I lived there for 8 months (Tarragona)
    Last edited by jolivanes; 04-21-2017 at 10:35 AM. Reason: Additional info

Posting Permissions

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