Je ne vois pas trop comment tu peux faire executer une variable, en revanche, tu peux faire executer une macro ou une fonction et tu peux faire appel a une variable.
Peut etre que quelqu'un d'autre t'apportera une réponse différente, on ne sais jamais, ici il y a beaucoup de membres balèze...
[SIZE=2]Sub test()
[COLOR=navy]Dim [/COLOR]Commande[COLOR=navy] As String[/COLOR]
Commande = "MaMacro"
[B]Application.Run[/B] Commande
[COLOR=navy]End Sub[/COLOR]
[COLOR=navy]Sub[/COLOR] MaMacro()
MsgBox "On ne met jamais ""URGENT"" dans les titres de sujet !" & VbLf & "Merci de lire la Charte"
[COLOR=navy]End[/COLOR] Sub[/SIZE]
... Sub test()
Commande = "MaMacro"
Application.Run Commande]
Oooops,
Ceci marche si Commande = "MaMacro" ,
mais je souhaite que Commande = "Cette instruction"
Dans le cas précis :
Commande = "SpinButtonP1.Value = " & Str(Int(Range("SimulationAugmentationP1") * 100))
Et là j'ai une erreur d'exécution 1004 : Impossible de trouver la macro 'SpinButtonP1.Value = 120'