'Create a Module so you can access the SendError sub from anywhere in your project Module Module1 Public Sub SendError(ByVal ErrorMsg As String) Dim Licensekey As String = "UI!RE$2" 'Enter personal LicenseKey goes here. Dim ThisAppName As String = "Accounting System" 'Enter your Application Name here. Try Dim em As New ErrorMail.ErrorMailer 'Instantiate the WebService em.SendErrorEX(Licensekey, ErrorMsg, ThisAppName) 'Invoke the WebService Catch ex As Exception 'Do nothing End Try End Sub End Module ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 'In your Error Trap, add a call to invoke the SendError Sub 'SQL Code shown for demonstrations purposes only, you only need to 'include the SendError statement in your applications. Dim cmd As New SqlClient.SqlCommand(sql, conn) Try If conn.State <> ConnectionState.Open Then conn.Open() cmd.ExecuteNonQuery() Catch ex As Exception SendError("Updating the Database Failed" & vbCrLf & ex.Message) End Try In this example, we just add a single line of code to call our SendError sub-routine. We pass only the error message into the sub-routine, because the SendError sub-routine already knows the LicenseKey and AppName.