Excel VBA - Loop in a string
Hi all,
I am new in VBA and I have searched for solution for this issue I have but without any luck. I am sure there is already somewhere but I am doing something wrong...
I have this 2 lines in SAP script:
session.findById("wnd[0]/usr/lbl[1,6]").setFocus
session.findById("wnd[0]/usr/lbl[1,6]").caretPosition = 0
I need that, instead of number 6 there is a loop so I can have all numbers from 6 to for example 9.
For example:
Dim i as Integer
i=6
Do while i=9
session.findById("wnd[0]/usr/lbl[1, i ]").setFocus
session.findById("wnd[0]/usr/lbl[1, i ]").caretPosition = 0
i = i + 1
loop
(this is just a rough draft so you can get an idea what I need)
Thank you very much for all suggestions! I appreciate any help on this