Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I am trying to show some values using msgbox after using FIND. But when I try to find a value that does not exist in the sheet I get an error: Run_time: "91" h = InputBox("Type number of holes to find") For X = 1 To h np = InputBox("type the name of the hole:") Cells.Find(What:=np, After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate N = ActiveCell L = ActiveCell.Offset(0, 1) S = ActiveCell.Offset(0, 2) MsgBox ("Pozo:" & " " & N & " " & "Linea:" & " " & L & " " & "Serial:" & " " & S) End If Next How can I trap this run-time error? Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Handling - On Error GoTo doesn't trap error successfully | Excel Programming | |||
Error Trap | Excel Programming | |||
Error Trap | Excel Programming | |||
error trap | Excel Programming |