Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I am using the code below to highlight a row in a listbox - however it always selects a row 8 rows below which it should select. The start row for Column "C" is row 9 could this be the reason?? have tried all different bits of code all to no avail can anybody help me. Private Sub Add602_Click() Dim rngToSearch As Range Dim rngFound As Range Startrownumber = 9 Set rngToSearch = ActiveSheet.Columns("C") Set rngFound = rngToSearch.Find(What:=Tb1B.Value, _ LookIn:=xlFormulas, _ LookAt:=xlWhole, _ MatchCase:=False) If rngFound Is Nothing Then MsgBox "Sorry " & Tb1B.Value & " was not found." Else LisBox1.ListIndex = rngFound.Row - 2 End If End Sub -- Many Thanks Sue |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Multiple cells or columns are selected instead of selected cell or | Excel Discussion (Misc queries) | |||
Wrong columns sometimes selected --? | Excel Programming | |||
Insert Calculated Field (wrong Qty*Price = wrong Amount) | Excel Discussion (Misc queries) | |||
Macro to take selected cells times a selected cell | Excel Programming | |||
how do i make it so that when a sheat is selected either via link or tab, that xlLastCell is selected. the last on the sheet. | Excel Worksheet Functions |