After opening an Excel Worksheet, etc. I can change easily to different pages, for example page 2 with this invoke:
invoke WorkSheets "getItem" using by Value 2
       returning WorkSheet
But when I do not use tho constant value 2, but instead a variable which contains the value 2, the program aborts.
000303 77 N-AGENTE PIC 99 VALUE 2.
no one of these 3 examples work
      *      invoke WorkSheets "getItem" using by value N-AGENTE
      *      invoke WorkSheets "getItem" using by reference N-AGENTE
      *      invoke WorkSheets "getItem" using by content N-AGENTE
The compiler does not send an error, but running the program I receive the message
Exception 65537 not trapped by the class oleexception manager.
Any idea what is missing. How must I define the variable'
Thanks
Rolf
#Excel

