Hi, I'm using the following to make a connection between excel and SAP:
If Not IsObject(SAPApplication) Then
On Error GoTo SAP_NOT_OPEN:
Set SapGuiAuto = GetObject("SAPGUI")
Set SAPApplication = SapGuiAuto.GetScriptingEngine
End If
er = Err.Number
If Not IsObject(Connection) Then...