• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

ListBox Item Update By Double Click

delta

Member
when i double click on any item of listbox to update then only last item show in TextBoxes my code is below

>>> use code - tags <<<
Code:
Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

Dim x As Long

With UserForm1

    For x = 1 To .ListBox1.ListCount - 1
        
       
            .TextBox1.Value = .ListBox1.List(x, 0)
            .TextBox2.Value = CDate(.ListBox1.List(x, 1))
            .TextBox3.Value = .ListBox1.List(x, 2)
            .TextBox4.Value = .ListBox1.List(x, 3)
            
   
    Next x

End With

End Sub
i also attache the sample file
 

Attachments

Top