Skip to Content
avatar image
Former Member

How to copy the cell instead text?

Hello, i'm trying to copy one line of the excel, and go to the line above, do it about a 3000 times, but the macro recognizes that i'm copying the same number. I need to copy code 100020781 till 10010781

Here's a little piece of my code:

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 session.findById("wnd[0]").maximize session.findById("wnd[0]/usr/ctxtRM07I-IBLNR").text = "100020781" session.findById("wnd[0]/tbar[1]/btn[14]").press session.findById("wnd[0]").sendVKey 0 session.findById("wnd[1]/usr/btnSPOP-OPTION1").press session.findById("wnd[0]/usr/ctxtRM07I-IBLNR").text = "100020782" session.findById("wnd[0]/tbar[1]/btn[14]").press session.findById("wnd[0]").sendVKey 0 session.findById("wnd[1]/usr/btnSPOP-OPTION1").press

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers