Jumat, 14 Desember 2012

Re: [ExcelVBA] help - script excel/sap

 

I cannot test this, but by it's nature, you're including a string:
session.findById("string_goes_here").Text = Excel.Cells(x, 5)

So, that means that it should allow any "expression" that results in a string:
"wnd [0] / usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR [0, " & z & "]"

 
Paul
-----------------------------------------
"Do all the good you can,
By all the means you can,
In all the ways you can,
In all the places you can,
At all the times you can,
To all the people you can,
As long as ever you can." - John Wesley
-----------------------------------------

________________________________
From: Jailson Silva <jailson.silvas@yahoo.com.br>
To: ExcelVBA@yahoogroups.com
Sent: Fri, December 14, 2012 9:46:39 AM
Subject: [ExcelVBA] help - script excel/sap

 

 
Good morning,
 
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,0]").Text =
Excel.Cells(x, 5)
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,1]").Text =
Excel.Cells(x + 1, 5)
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,2]").Text =
Excel.Cells(x + 2, 5)
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,3]").Text =
Excel.Cells(x + 3, 5)
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,4]").Text =
Excel.Cells(x + 4, 5)
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,5]").Text =
Excel.Cells(x + 5, 5)
session.findById("wnd[0]/usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR[0,6]").Text =
Excel.Cells(x + 6, 5)
 
 
how do I put a variable in place of this sequence of numbers I have highlighted,
because I have a large numbers of lines to be introduced in the sap,

example

session.findById ("wnd [0] / usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR [0, z]").
Excel.Cells Text = (x, 5)
session.findById ("wnd [0] / usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR [0, z
+1]"). Excel.Cells Text = (x + 1, 5)
session.findById ("wnd [0] / usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR [0, z
+2]"). Excel.Cells Text = (x + 2, 5)
session.findById ("wnd [0] / usr/tblSAPLCPDITCTRL_3400/txtPLPOD-VORNR [0, z
+3]"). Excel.Cells Text = (x + 3, 5)

but that this way of error.

Anyone know if there's a way to solve this?

Thank you.

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (10)
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar