I'm working on a vb parser for excel but when it comes across anything that is not int the spread sheet it gives me an excel error message and I want to stop that before it prompts.

Try
            xlWorkSheet.Cells.Replace(What:="Boulevard", Replacement:="BLVD")
        Catch ex As Exception
            ex = Nothing
        End Try

The Try/Catch construct wasn't implemented until VB.Net, so you'll have to use the "On Error Go To..." construct.

Here's a sample:

Private Sub Form_Load()
On Error GoTo form_load_error
.
.   Your (error-prone) code goes here
.

form_load_resume:
Exit Sub

form_load_error:
MsgBox "Error " + CStr(Err.Number) + ": " + Err.Description, vbCritical + vbOKOnly
If Err.Number = 12345 then   ' ---- or whatever you want to trap
    Resume form_load_resume
Else
    Resume Next
End If

End Sub

Hope this helps a little!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.