LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 114
Default List Box Match

Hi All

I have adapted the code below from something I found in this forum

Private Sub Cmd1_Click()
Dim rngToSearch As Range
Dim rngFound As Range
Set rngToSearch = ActiveSheet.Columns("F")
Set rngFound = rngToSearch.Find(What:=Tb1.Value, _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
MatchCase:=False)
If rngFound Is Nothing Then
MsgBox "Sorry " & Tb1.Value & " was not found."
Else
rngFound.Select

End If

End Sub

It works OK and finds the number I'm searching for in Column "F" what I
would like to happen is that on finding the correct selection it will also
highlight the row in the list box "Lb1" which also contains the same number
in Column 5 in the list box ,it would then display the information in a new
TextBox "Tb2" -- I would then not have to keep closing the UserForm to read
all the info. Hope I have expained it all properly.
--
Many thanks

hazel
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find a match in a list jlclyde Excel Discussion (Misc queries) 1 February 28th 08 07:18 PM
match list Jai Excel Discussion (Misc queries) 4 June 27th 07 08:44 PM
match and list Anthony Excel Worksheet Functions 1 March 24th 07 12:07 PM
Product list to match price list badgrandntl Excel Discussion (Misc queries) 13 February 2nd 06 02:28 AM
searching a list box for a filename match...and highlighting the match suee[_4_] Excel Programming 1 April 13th 04 02:56 AM


All times are GMT +1. The time now is 04:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"