ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error 448 - OOps ... herewith the code (https://www.excelbanter.com/excel-programming/346885-re-error-448-oops-herewith-code.html)

Dave Peterson

Error 448 - OOps ... herewith the code
 
Drop the searchformat stuff. It was added in xl2002.

Jim wrote:

Sub BasicFindReg()
Dim Title As String
Dim RegNo As String

Title = "Test Macro to Find Reg Number"
RegNo = InputBox("Enter the Original Reg No or Present Reg No", Title)

On Error Resume Next
With Columns("C:D")
.Find(What:=RegNo, After:=Range("C1"), LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
_
MatchCase:=False, SearchFormat:=False).Activate
End With

If Error "0" Then
Response = MsgBox("Error - " & Err, vbOK, Title)
End If

End Sub


--

Dave Peterson


All times are GMT +1. The time now is 09:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com