Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find a match in a list | Excel Discussion (Misc queries) | |||
match list | Excel Discussion (Misc queries) | |||
match and list | Excel Worksheet Functions | |||
Product list to match price list | Excel Discussion (Misc queries) | |||
searching a list box for a filename match...and highlighting the match | Excel Programming |