Jumat, 14 Desember 2012

[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]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (9)
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