Hello!
Does anyone know how to suppress the prompt for logging on to Business Objects when using VBA? The code already does the trick so the prompt would have to be avoided otherwise it's blocking the rest of the script..
My Code:
Sub LogonToServer()
Dim lResult As Long
Dim MyClient As String
Dim MyUser As String
Dim MyPWD As String
Dim MyLang As String
MyClient = "xxx"
MyUser = "xxx"
MyPWD = "xxx"
MyLang = "EN"
' Log into SAP Analysis for Excel
iAppCall = Application.Run("SAPLogon", "DS_1", MyClient, MyUser, MyPWD, MyLang)
' Refresh the query Analysis -> Refresh All
lResult = Application.Run("SAPExecuteCommand", "Refresh", "DS_1")
End Sub