on 01-23-2015 3:53 PM
Hi guys,
Writing a simple vbs from Excel to perform SAP tasks but having a problem when I want to use the loop variable.
If I'm not in a loop then this works perfectly. Data is stored in variable Enumber and I can work with it.
Enumber = session.findById("wnd[0]/usr/tabsTS_ITOV/tabpTCMA/ssubSUBPAGE:SAPLCSDI:0152/tblSAPLCSDITCMAT/ctxtRC29P-IDNRK[2,1]").Text
The problem I'm having is when I want to use a loop to check all the rows in the square brackets. For example, when I want to check 10 rows I'd do this ....
For r = 1 to 10
But what format do I need to use to be able to use the r variable for the row number in the square bracket?
I've tried ..
....[2,) & r & (]") but that doesn't work and tried a few other variants too.
Thanks,
Mark
It's ok, I found the answer myself through looking on this forum.
Syntax should be ....
[2," & r & "]").Text
🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.