Skip to Content

Excel Macro screen update

Hello,

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").SetFocus

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

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

'Here follows the recorded VBScript . . .

Regards,

Mark

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on May 28, 2011 at 09:21 PM

    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.

    Regards,

    ScriptMan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2011 at 06:32 AM

    Scriptman Thank you , problem resolved.

    Regards,

    Mark

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.