You need to do something like this to set the object. I simply just ran the macro recorded within SAP to get the code below. If you can get this to work please let me know because I have been struggling with trying to write code that allows excel to talk to SAP. Does your SAP open via citrix as well?
If Not IsObject(application) Then
Set SapGuiAuto = GetObject("SAPGUI")
Set application = SapGuiAuto.GetScriptingEngine
End If
If Not IsObject(connection) Then
Set connection = application.Children(0)
End If
If Not IsObject(session) Then
Set session = connection.Children(0)
End If
If IsObject(WScript) Then
WScript.ConnectObject session, "on"
WScript.ConnectObject application, "on"
End If