LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sue Sue is offline
external usenet poster
 
Posts: 285
Default List Box Highlight Selection from Sheet

Hi Everybody

I have a sheet using Rowsource A2:G470 which populates a Listbox
in Column G is a unique number for each row.

On a Userform I use the following to find the number on the sheet in Column
G when it finds the number is it possible for the row in the list box to be
highlighted.

below is the code I'm using to find the number on the sheet.

Private Sub Cmd100_Click()
Dim rngToSearch As Range
Dim rngFound As Range

Set rngToSearch = ActiveSheet.Columns("G")
Set rngFound = rngToSearch.Find(What:=TB100.Value, _
LookIn:=xlFormulas, _
LookAt:=xlWhole, _
MatchCase:=False)
If rngFound Is Nothing Then
MsgBox "Sorry " & TB100.Value & " was not found."
Else

rngFound.Select
ActiveCell.Interior.Color = RGB(126, 255, 126) 'Green
End If


End Sub

Many thanks


--
Many Thanks

Sue
 
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
MAtch drop down list selection to data sheet SMOKN_ENG_MOM[_2_] Excel Worksheet Functions 1 August 25th 08 04:16 PM
Copy Rows to New Sheet based on User Selection in Drop-down List Carlee Excel Programming 0 April 2nd 07 04:46 PM
Moved data to new sheet based on list selection scronk Excel Worksheet Functions 1 October 18th 05 08:08 AM
Selection from list on main sheet from suplemental sheet in same w Kelly New Users to Excel 1 August 12th 05 04:37 PM
limit cell list selection based on the selection of another list lorraine Excel Worksheet Functions 2 December 14th 04 08:17 PM


All times are GMT +1. The time now is 12:20 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"