View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dthmtlgod dthmtlgod is offline
external usenet poster
 
Posts: 2
Default Listbox - Text Field

I have a worksheet that has three columns and two row of data

Orange Score Missed
Red Score Target

I have a form with a listbox and two text boxes

The list box is populated with Orange and Red by using the below code

With Sheets("Sheet1")
Set r = .Range(.Range("A2"), .Range("A" & Rows.Count).End(xlUp))
For Each c In r
ListBox1.AddItem c
Next c
End With

I want to be able to click on Orange and populate the text box with the
corresponding values.

Can someone point me in the right direction?