Option Explicit Public Sub SendServ(strData As String) On Error GoTo ERRH_ With ds1 .SendData strData & vbCrLf End With Exit Sub ERRH_: If Err.Number = 40006 Then Resume Next Else MsgBox "Description: " & Err.Description & vbCrLf & "Number: " & Err.Number, vbCritical, App.Title End If End Sub