16 messages in org.openoffice.fr.progRe: [prog] Nom de variable dynamique
FromSent OnAttachments
Michel GrentzingerNov 7, 2007 4:39 am 
Bernard MarcellyNov 7, 2007 5:19 am 
Michel GrentzingerNov 7, 2007 5:43 am 
Mathias MichelNov 7, 2007 7:26 am 
BobNov 7, 2007 9:48 am 
Michel GrentzingerNov 7, 2007 1:16 pm 
Michel GrentzingerNov 7, 2007 1:19 pm 
Mathias MichelNov 7, 2007 2:28 pm 
Michel GrentzingerNov 8, 2007 12:17 am 
BobNov 8, 2007 1:29 am 
Laurent GodardNov 8, 2007 1:41 am 
Michel GrentzingerNov 8, 2007 4:45 am 
BobNov 8, 2007 11:59 am 
Michel GrentzingerNov 8, 2007 1:06 pm 
BobNov 8, 2007 2:23 pm 
Michel GrentzingerNov 9, 2007 4:48 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [prog] Nom de variable dynamiqueActions...
From:Bernard Marcelly (marc@club-internet.fr)
Date:Nov 7, 2007 5:19:32 am
List:org.openoffice.fr.prog

Message de Michel Grentzinger date 2007-11-07 13:40 :

Bonjour,

Je cherche à créer une variable dont le nom est issu du contenu d'une autre variable.

J'ai bien trouvé http://fr.openoffice.org/servlets/ReadMsg?listName=prog&msgNo=1281 mais sans trouver de réelle réponse à mon problème.

Est-ce possible de créer une variable dont le nom serait obtenu dynamiquement, à l'exécution de la macro ?

Tu ne précises pas le langage utilisé, donc c'est OOoBasic. Ce n'est pas possible sans acrobatie (comme la bibliothèque dynamique de Xray), et cela ne simplifiera pas la compréhension et la mise au point de ton programme.

La réponse de Laurent au message cité est très probablement la réponse adéquate à ton problème. En d'autres termes, réfléchis sur une solution utilisant des tableaux. Ou une autre solution comme un Select Case. Trouver une bonne solution, c'est là où le programmeur doit faire preuve de créativité.

Bernard