Option Explicit Private Sub SendToApp_BeforeUserChanged(KeepFocus As Boolean, CancelLogic As Boolean) Dim strAppName As String Dim strINTERID As String Dim intSOPType As Integer Dim strSOPNumber As String Dim strCustomerID As String Dim strMessage As String Dim strNull As String Dim lngWindowID As Long Dim lngResult As Long Dim blnResult As Boolean Dim GPMessage As New GPMessage.MessageHelper strAppName = "Receiving App" strINTERID = UserInfoGet.IntercompanyID intSOPType = SOPTypeDatabase.Value strSOPNumber = DocumentNo.Value strCustomerID = CustomerID.Value strNull = vbNullString If strSOPNumber = "" Then MsgBox "Please select a SOP Number" Exit Sub End If If strCustomerID = "" Then MsgBox "Please select a Customer" Exit Sub End If strMessage = strINTERID & "," & intSOPType & "," & strSOPNumber & "," & strCustomerID lngWindowID = GPMessage.GetWindowId(strNull, strAppName) If lngWindowID = 0 Then MsgBox "Please confirm that " & strAppName & " is running.", vbOKOnly + vbExclamation, "Application Not Running" Exit Sub End If lngResult = GPMessage.SendStringMessage(lngWindowID, 0, strMessage) blnResult = GPMessage.BringAppToFront(lngWindowID) End Sub