Thread: vlookup
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
William[_2_] William[_2_] is offline
external usenet poster
 
Posts: 227
Default vlookup

Hi Patrick

If I have understood you correctly, try....

Private Sub ListBox1_Click()
Dim i As Integer
TextBox1 = ""
For i = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(i) Then
TextBox1 = ListBox1.List(i)
Exit Sub
End If
Next i
End Sub


--

XL2003
Regards

William



"Patrick Simonds" wrote in message
...
Would it be possible to use a variable returned by a ListBox, on a
UserForm, to place a value in a TextBox on the same UserForm? Maybe on a
ListBoxClick routine.