Bonjour,
Comment peut on enregistrer sur 2 feuilles en même temps dans le même classeur.
Voici mon code
Merci d'avance
Max
Comment peut on enregistrer sur 2 feuilles en même temps dans le même classeur.
Voici mon code
Code:
Private Sub CommandButton2_Click()
If ComboBox1.ListIndex > -1 Then
With Sheets(ComboBox1.Text)
.Range("B5:L5").Insert shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
.Cells(5, 4) = TextBox1.Value: TextBox1 = "" ' Nom
.Cells(5, 5) = TextBox2.Value: TextBox2 = "" ' Prénom
.Cells(5, 6) = TextBox3.Value: TextBox3 = "" ' Adresse
.Cells(5, 8) = TextBox4.Value: TextBox4 = "" ' Ville
.Cells(5, 7) = TextBox5.Value: TextBox5 = "" ' C.P
.Cells(5, 9) = TextBox6.Value: TextBox6 = "" ' Tel
.Cells(5, 2) = TextBox7.Value: TextBox7 = "" ' Date
.Cells(5, 3) = TextBox11.Value: TextBox11 = "" ' N° Cde
.Cells(5, 10) = TextBox8.Value: TextBox8 = "" ' Montant
.Cells(5, 11) = TextBox9.Value: TextBox9 = "" ' Frais
.Cells(5, 12) = TextBox10.Value: TextBox10 = "" ' T.T.C
End With
ComboBox1.ListIndex = -1
Else
MsgBox "Choisir un 'Tranmetteur' !"
End If
End Sub
Merci d'avance
Max