Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have implemented the Selection.Find method to find a value in a column, and
have the code working to display an error message if the value was not found, but cannot figure out how to determine the row of the cell that is selected if a match is found. The line of code that reads intRowPointer = Selection.Row always returns a 1. Any help would be greatly appreciated. 'Turn off error trapping for in-line analysis On Error Resume Next 'Search the Task# column for the entered value Selection.Find(What:=Me.txt_GoToTask, After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate 'If the task number was found, move the pointer to it. 'If not, display an error message If Err.Number = 0 Then intRowPointer = Selection.Row Call FillControls Else MsgBox "Task not found" End If Err.Clear On Error GoTo 0 Dale -- Email address is not valid. Please reply to newsgroup only. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determine what row is currently selected | Excel Programming | |||
Determine what row is currently selected | Excel Programming | |||
Determine which button was selected ?? | Excel Programming | |||
Determine exctent of selected range | Excel Programming | |||
Determine Selected Cells | Excel Programming |