Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Excel Macro screen update


I'm using the above approach to connect to SAP in order to upload data from excel to SAP R/3 transaction.

Myquestions is there exist away to prevent the screen flickering from EXCEL to SAP during the macro processing , tried to the statement at the excel macro : Application.ScreenUpdating =FALSE which didn't worked.

In other words my requirement is not see SAP screen at all during the macro processing.

If Not IsObject(SAPguiApp) Then

Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")

End If

If Not IsObject(Connection) Then

Set Connection = SAPguiApp.OpenConnection("SYSTEM", True)

End If

If Not IsObject(Session) Then

Set Session = Connection.Children(0)

End If

Session.findById("wnd[0]/usr/txtRSYST-MANDT").Text = "CLIENT"

Session.findById("wnd[0]/usr/txtRSYST-BNAME").Text = "USER"

Session.findById("wnd[0]/usr/pwdRSYST-BCODE").Text = "PASSWORD"

Session.findById("wnd[0]/usr/txtRSYST-LANGU").Text = "EN"


Session.findById("wnd[0]/usr/txtRSYST-LANGU").caretPosition = 2

Session.findById("wnd[0]").sendVKey 0

'Here follows the recorded VBScript . . .




Hi Mark, welcome to the forum.

I'd test it with session.findById("wnd [0]"). iconify.

And I would eliminate the command session.findById("wnd [0]").maximize.



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question