Pour le fait de saisir les données de mon UserForm dans la feuille Saisie.
Ca ne fonctionne pas. Ca prend toujours la feuille que je suis active.
Voici mon code et mon fichier
'Nouveau code
Private Sub CommandButton1_Click()
Dim L As Integer
If MsgBox("Confirmez-vous l’ajout de ce nouveau code ?", vbYesNo, "Demande de confirmation d’ajout de code") = vbYes Then
With Sheets("Saisie")
L = .Range("a1048576").End(xlUp).Row + 1
Range("A" & L).Value = TextBox1
Range("B" & L).Value = ComboBox11
Range("C" & L).Value = ComboBox3
Range("AL" & L).Value = TextBox6
Range("F" & L).Value = TextBox7
Range("AK" & L).Value = ComboBox12
Range("AJ" & L).Value = TextBox15
Range("V" & L).Value = ComboBox13
Range("Z" & L).Value = TextBox3
Range("W" & L).Value = ComboBox1
Range("X" & L).Value = ComboBox4
Range("Y" & L).Value = ComboBox5
Range("AA" & L).Value = ComboBox6
Range("AB" & L).Value = ComboBox7
Range("AC" & L).Value = ComboBox8
Range("AD" & L).Value = ComboBox9
Range("AF" & L).Value = TextBox4
Range("AG" & L).Value = TextBox5
End With
TextBox1.Value = ""
ComboBox11.Value = ""
ComboBox3.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
ComboBox12.Value = ""
TextBox15.Value = ""
ComboBox13.Value = ""
TextBox3.Value = ""
ComboBox1.Value = ""
ComboBox4.Value = ""
ComboBox5.Value = ""
ComboBox6.Value = ""
ComboBox7.Value = ""
ComboBox8.Value = ""
ComboBox9.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
MsgBox "Le nouveau code a été ajouté!"
Else
MsgBox "Vous pouvez apporter les modifications nécessaires."
End If
End Sub