Re : Activation de userforms par combobox
;
😉 Merci à toi ! C'est exactement ce que je voulais.
Je vais travailler sur ton code pour bien en comprendre les modifications.
Merci à tous
🙂Bonjour à tous,
Comment ajouter des "liens" dans une combox" afin d'appeller différents userform. J'ai un code pour deux mais quand je veux en intégrer un troisième dans la combo ça ne marche pas
🙁
Private Sub ajouter_Click()
UserForm1.Show
End Sub
Private Sub ComboBox1_Change()
If ComboBox1.Value = "Ajouter une commande" Then
Unload gestion_commandes
UserForm1.Show
Else
Unload gestion_commandes
UserForm2.Show
End If
End Sub
Private Sub CommandButton18_Click()
End Sub
Private Sub ComboBox2_Change()
If ComboBox2.Value = "Ajouter une commande" Then
Unload gestion_commandes
UserForm1.Show
Else
Unload gestion_commandes
UserForm2.Show
End If
End Sub
Private Sub ComboBox3_Change()
If ComboBox3.Value = "Ajouter une commande" Then
Unload gestion_commandes
UserForm1.Show
Else
Unload gestion_commandes
UserForm2.Show
End If
End Sub
Private Sub ComboBox4_Change()
If ComboBox5.Value = "Ajouter une commande" Then
Unload gestion_commandes
UserForm1.Show
Else
Unload gestion_commandes
UserForm2.Show
End If
End Sub
Private Sub ComboBox5_Change()
End If
End Sub
Private Sub ComboBox6_Change()
If ComboBox6.Value = "Ajouter une commande" Then
Unload gestion_commandes
UserForm1.Show
Else
Unload gestion_commandes
UserForm2.Show
End If
End Sub
Private Sub CommandButton5_Click()
Me.Hide
End Sub
Private Sub rechercher_commande_Click()
UserForm2.Show
End Sub
Private Sub UserForm_Initialize()
Dim k%
ComboBox1.Clear
With Me.ComboBox1
.AddItem "Ajouter une commande"
.AddItem "Rechercher une commande"
End With
With Me.ComboBox2
.AddItem "Ajouter une commande"
.AddItem "Rechercher une commande"
End With
With Me.ComboBox3
.AddItem "Ajouter une commande"
.AddItem "Rechercher une commande"
End With
With Me.ComboBox4
.AddItem "Ajouter une commande"
.AddItem "Rechercher une commande"
.AddItem "Gérer coûts productifs"
End With
With Me.ComboBox5
.AddItem "Ajouter une commande"
.AddItem "Rechercher une commande"
End With
With Me.ComboBox6
.AddItem "Ajouter une commande"
.AddItem "Rechercher une commande"
End With
End Sub