-10

My code is almost perfect, I need to change one line but in not sure how.

My line is as follows

Session.FindById("wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON/ctxtVBAK-VBELN[0,0]").Text = Fill(LoopNum)

My problem is I need it to be this

Session.FindById("wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON/ctxtVBAK-VBELN[0,LoopNum]").Text = Fill(LoopNum)
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • If you need it to be that, then change it... I'm not sure what you're getting at here – Maldred Oct 27 '17 at 19:54
  • This is not the answer to your question, but please read> [How to Ask](https://stackoverflow.com/help/how-to-ask) –  Oct 27 '17 at 20:24
  • use `Session.FindById(wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON/ctxtVBAK-VBELN[0,LoopNum].Text = Fill(LoopNum)` – jsotola Oct 28 '17 at 04:52
  • it is not clear what you are asking. in the first line, you use a numeric constant `0` .... in the second line you use a variable, i assume it is also a numeric value ... there is no way that anyone can help you until you tell us what the problem is .... your question is like this one: i have `kjasdrglkhsartfiu` but i want `;iwre;oifkjbhf`, can you help me? – jsotola Oct 28 '17 at 05:01

1 Answers1

0

My suggestion is as follows:

Session.FindById("wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON‌​/‌​ctxtVBAK-VBELN[0,‌​" & cstr(Loo‌​pNum) & "]").Text = Fill(LoopNum) 

Regards, ScriptMan

ScriptMan
  • 1,580
  • 1
  • 9
  • 9
  • When I run the program with the changes you suggested, it throws Me "run-time error '619' application-defined or object defined error" I'm only trying to traverse the table using a variable that changes on each run through a loop – thePattiestOfKakes Oct 27 '17 at 21:01
  • And that's actually the problem. The original code is not correct. Correctly it should be as follows: Session.FindById("wnd[0]/usr/tblZVMGO_SO_RDD_FDF_UPDTETABCON/‌​ctxtVBAK-VBELN[0,Loo‌​pNum]").Text = Fill(LoopNum) And then my suggestion would be better. – ScriptMan Oct 28 '17 at 11:19