Hi, I'm trying to modify the code below to find the letter "r" in the range "File_Range". It works fine if there is an "r" in 1 or more cells. But if there are no letters "r" it gives a runtime 1004 error. Where I would like it to display a message.
Sub test()
Dim l As Long
l = Application.WorksheetFunction.Match("r", Range("File_Range"), 0)
MsgBox "Please ensure all files are available!", vbCritical + vbOKOnly, "Cancelled"
End Sub
Sub test()
Dim l As Long
l = Application.WorksheetFunction.Match("r", Range("File_Range"), 0)
MsgBox "Please ensure all files are available!", vbCritical + vbOKOnly, "Cancelled"
End Sub