Afficher un message
Vieux 05/11/2004, 18h33   #8 (permalink)
michel
Guest
 
Messages: n/a
Par défaut Re: Passer paramètre code click bouton

bonjour Clarck

Cela fonctionne aussi .Dans ce cas , la variable "Public p_nom As String" doit rester dans un module

'la macro du CommandButton dans la feuille
Private Sub CommandButton1_Click()
MsgBox p_nom
End Sub

'la macro du CommandButton dans le UserForm , qui va appeler la premiere macro
Private Sub CommandButton1_Click()
p_nom = "Jean"
Application.Run Sheets("Activite").CodeName & ".CommandButton1_Click"
End Sub


bonne soirée
MichelXld