Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug?? Excel and VFP and Names.count ?
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Bug?? Excel and VFP and Names.count ?
Divers
Thread ID:
00926750
Message ID:
00926750
Vues:
57
Is this a bug. There are 142 range names on my spreadsheet. And o.Names.Count returns 142.
I have a for i = 1 to o.Names.Count, with a comment shouldn't this suffice. But if
I do not include and IF i < o.Names.Count (&&& should I need this ), the for i to o.names.Count
will not terminate on its own, it goes to a count of 143 and then an excel error happens
STeve
oRange = "catp"
o = GETOBJECT(,'excel.application')
ThisNewName =  oRange
amHere = 0
FOR i = 1 TO o.Names.Count  &&&&&&&&&&&&&&&&&&&&& shouldn't this suffice
thisHere = thisNewName
IF i < o.Names.Count  &&&&&&&&&&&&&&&&&&&&&&&&&&& should I need this ?
thisOne = ALLTRIM(LOWER(o.Names[i].name )) 
? trans(amhere) + " " +o.Names[i].name +" "+ TRANSFORM(i) +" "+ TRANSFORM( o.Names.Count)
IF thisHere$thisOne
amHere = amHere + 1
? trans(amhere) + " " +o.Names[i].name 
o.Names[i].delete
endif
endif
ENDFOR
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform