grisan29
XLDnaute Accro
bonjour a tous et toutes
j'ai 5 boutons qui doivent ouvrir un userform sur lequel est posé un calendrier autonome avec un bouton qui écrit le choix dans un textbox mais comment fait que ce bouton réagissement en envoyant sa donné dans un autre textbox suivant quel bouton la demandé
j'ai fait un essai mais bug a commandbutton
car écrit comme ceci il fonctionne très bien pour un seul textbox
j'ai mis des select car avec des range ou des value le bug est le même
j'ai 5 boutons qui doivent ouvrir un userform sur lequel est posé un calendrier autonome avec un bouton qui écrit le choix dans un textbox mais comment fait que ce bouton réagissement en envoyant sa donné dans un autre textbox suivant quel bouton la demandé
j'ai fait un essai mais bug a commandbutton
Code:
Private Sub OK_Click()
If Me.CommandButton5.Select Then
UserForm2.TB_date.Value = CDate(FormCal.Jour)
Else
If CommandButton6.Select Then
UserForm2.TB_date1.Value = CDate(FormCal.Jour)
Else
If CommandButton7.Select Then
UserForm2.TB_date2.Value = CDate(FormCal.Jour)
Else
If CommandButton8.Select Then
UserForm2.TB_date3.Value = CDate(FormCal.Jour)
Else
If CommandButton9.Select Then
UserForm2.TB_date4.Value = CDate(FormCal.Jour)
Else
End If
Unload Me
End Sub
car écrit comme ceci il fonctionne très bien pour un seul textbox
Code:
Private Sub OK_Click()
UserForm2.TB_date.Value = CDate(FormCal.Jour)
Unload Me
End Sub
j'ai mis des select car avec des range ou des value le bug est le même
Dernière édition: