I don't know how to do this in VBA, this is the first time ive used it.

I have a listbox on my UserForm that lists employees, the datasource is Sheet1!A5:A600. I want the user to be able to select a name, have the name populate a textbox, then the user can enter data in other txtBoxes and have that data populate cells in the same row as the name. This sounds very simple, but I just don't know.

Here is what I've been able to cobble together so far.


Private Sub lstBXEmployees_Click()

Dim Employee As Variant
Dim Name As String
Dim Dept As String
Dim DOB As String
Dim manufac As String
Dim lot As String
Dim ExpDate As String
Dim dateGiven As String
Dim VacType As String
Dim dose As String
Dim route As String


Employee = Empty
'If you add more than 500 names you will need to increase this
With ActiveSheet.Range("a5:a602")
Name = lstBXEmployees.Value
Set Employee = .Find(what:=Name, LookIn:=xlValues)


'txtName.Text = Name
If Not Employee Is Nothing Then Employee.Rows.EntireRow.Select
txtName.Text = Name
txtDOB.Text = DOB


' Exit Sub
'End If

End With
'closes the form when you click on a name

Set Employee = Nothing

End Sub

the Name is populating the txtName textbox, however I dont know how to populate the other textboxes. How do you tell what row to populate?