Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid Subscript on ActiveX call
Message
 
À
29/07/2009 05:04:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01415259
Message ID:
01415260
Vues:
45
Hi Gary,

Maybe this COM use indexing from "zero to n" isntead from "one to n".
lnKey=otxText.TableInsert(4,3,-1)

IF lnKey<0      && tables created
  FOR lnRow=0 TO 3
    FOR lnCol=0 TO 2
      otxText.TableCellText(lnKey,lnRow,lnCol) ="Hello"         <-- this line generates error
    ENDFOR
    IF lnRow=0 .AND. tlHeader-1
      FOR lnCol=0 TO 2
        otxText.TableCellAttribute(lnKey,lnRow,lnCol,8-1)=1         <-- this line generates error
      ENDFOR
    ENDIF
  ENDFOR
ENDIF
MartinaJ

>I am getting an "Invalid Subscript Reference" error when trying to call a method on an ActiveX control.
>
>I've seen a few documented but mine relates to TxText;
>
>
>lnKey=otxText.TableInsert(4,3,-1)
>
>IF lnKey<0      && tables created
>  FOR lnRow=1 TO 4
>    FOR lnCol=1 TO 3
>      otxText.TableCellText(lnKey,lnRow,lnCol) ="Hello"         <-- this line generates error
>    ENDFOR
>    IF lnRow=1 .AND. tlHeader
>      FOR lnCol=1 TO 3
>        otxText.TableCellAttribute(lnKey,lnRow,lnCol,8)=1         <-- this line generates error
>      ENDFOR
>    ENDIF
>  ENDFOR
>ENDIF
>
>
>
>As I say I've found a few reports, but can't find a solution anywhere. Does anyone know of one?
>
>
>Gary.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform