Skip to Content
avatar image
Former Member

VBA code - layout change

Hi, I have simply line in my VBA to set focus on field, but sometimes it doesnt work:

session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\01/ssubSUBSCREEN_BODY:SAPMV50A:1202/tblSAPMV50ATC_LIPS_OVER_INB/txtLIPSD-PIKMG[15,0]").setFocus

I found its most propably becouse two reasons:

1) layout change. I tried to switch columns and then I recorded but different code:

Session.findById("wnd[0]/usr/tabsTAXI_TABSTRIP_OVERVIEW/tabpT\04/ssubSUBSCREEN_BODY:SAPMV50A:1204/tblSAPMV50ATC_LIPS_PICK_INB/txtLIPSD-PIKMG[7,0]").SetFocus

2) field is not on the user visible screen (its outside, but if you will scroll to to left you can see it)

Its possible to change command to ignore those two points, so focus will be there no matter user change layout?

For example something like this?

Session.findById("wnd[0]/usr/tabs/LIPSD-PIKMG").SetFocus

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers