Information générale
Catégorie:
Codage, syntaxe et commandes
>I have several objects I want to address in a loop the objects are named Start, Start1, Start2 etc. I need to loop through some code pointing to thes objects incrementally. How can I make the syntax dynamic? Example: oProj.Tasks.Item(tre).Start(loop iteration) = rtew
You can use & or more efficianlty Eval() to get build the varibles and get references to your objects, but consider putting the objects in an array as an element instead, or a collection like Doug Hennig has described in some FoxTalk articles, if you care ot look into them.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement