On Error Resume Next And On Error GoTo Example of Excel VBA
below click for download file
https://drive.google.com/open?id=1HpUj-gBSTERFIj6tdV8FQpIrx6bmqJ_h
Below Example vba code
---------------------------------------
Sub onerrohandlingerror()
Dim rank As Integer
rank = InputBox("Enter Rank no")
On Error Resume Next
MsgBox Columns(1).Find(What:=rank).Offset(0, 1).Value
End Sub
--------------------------------------------------------
Sub onerrgoto()
Dim rank As Integer
rank = InputBox("Enter Rank no")
On Error GoTo myerrormsg
MsgBox Columns(1).Find(What:=rank).Offset(0, 1).Value
Exit Sub
myerrormsg:
MsgBox "rank not find in database"
Exit Sub
End Sub '
below click for download file
https://drive.google.com/open?id=1HpUj-gBSTERFIj6tdV8FQpIrx6bmqJ_h
Below Example vba code
---------------------------------------
Sub onerrohandlingerror()
Dim rank As Integer
rank = InputBox("Enter Rank no")
On Error Resume Next
MsgBox Columns(1).Find(What:=rank).Offset(0, 1).Value
End Sub
--------------------------------------------------------
Sub onerrgoto()
Dim rank As Integer
rank = InputBox("Enter Rank no")
On Error GoTo myerrormsg
MsgBox Columns(1).Find(What:=rank).Offset(0, 1).Value
Exit Sub
myerrormsg:
MsgBox "rank not find in database"
Exit Sub
End Sub '