View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mcat Mcat is offline
external usenet poster
 
Posts: 1
Default Listbox value return from search


I am trying to create a UserForm that will search a spreadsheet and
return multiple values to a listbox. For example the program below
searchs column E for the Value in textbox1.

How do I then return the value from column A of the same row to
listbox1?
Thanks,
M

Private Sub CommandButton7_Click()
With Worksheets(1).Range("e:e")
Set e = .Find(TextBox1, LookIn:=xlValues)
If Not e Is Nothing Then
firstAddress = e.Address
Do
"Write value from column A in same row to ListBox1"
Set e = .FindNext(e)
Loop While Not e Is Nothing And e.Address < firstAddress
End If
End With
End Sub


--
Mcat
------------------------------------------------------------------------
Mcat's Profile: http://www.excelforum.com/member.php...o&userid=29234
View this thread: http://www.excelforum.com/showthread...hreadid=489567