Code vba

Fermé
josh - 9 févr. 2016 à 16:30
bonjour. svp es que quelqu'un peut m'aider a réécrire et à faire exécuter plus rapidement les instructions ci-dessous.. merci!!!
en réalité jai envie d'afficher les valeurs de mon userform3 sur une feuil nommée "fact"
Sub fact_vente()
Application.ScreenUpdating = False
Set fl1 = Sheets("fact")
If MsgBox("Voulez-vous Sauvegarder la facture?", vbYesNo, "confirmation") = vbYes Then
fl1.Select
Sheets("Fact").Range("e6").Value = UserForm3.TextBox1.Value
Sheets("Fact").Range("b6").Value = UserForm3.ComboBox3.Value
Sheets("Fact").Range("b7").Value = UserForm3.ComboBox2.Value
Sheets("Fact").Range("c10:d10").Value = UserForm3.TextBox2.Value
Sheets("Fact").Range("b13:c13").Value = UserForm3.ComboBox4.Value
Sheets("Fact").Range("a13").Value = UserForm3.TextBox3.Value
Sheets("Fact").Range("d13").Value = UserForm3.TextBox13.Value
Sheets("Fact").Range("b14:c14").Value = UserForm3.ComboBox5.Value
Sheets("Fact").Range("a14").Value = UserForm3.TextBox4.Value
Sheets("Fact").Range("d14").Value = UserForm3.TextBox14.Value
Sheets("Fact").Range("b15:c15").Value = UserForm3.ComboBox6.Value
Sheets("Fact").Range("a15").Value = UserForm3.TextBox5.Value
Sheets("Fact").Range("d15").Value = UserForm3.TextBox15.Value
Sheets("Fact").Range("b16:c16").Value = UserForm3.ComboBox7.Value
Sheets("Fact").Range("a16").Value = UserForm3.TextBox6.Value
Sheets("Fact").Range("d16").Value = UserForm3.TextBox16.Value
Sheets("Fact").Range("b17:c17").Value = UserForm3.ComboBox8.Value
Sheets("Fact").Range("a17").Value = UserForm3.TextBox7.Value
Sheets("Fact").Range("d17").Value = UserForm3.TextBox17.Value
Sheets("Fact").Range("b18:c18").Value = UserForm3.ComboBox9.Value
Sheets("Fact").Range("a18").Value = UserForm3.TextBox8.Value
Sheets("Fact").Range("d18").Value = UserForm3.TextBox18.Value
Sheets("Fact").Range("b19:c19").Value = UserForm3.ComboBox10.Value
Sheets("Fact").Range("a19").Value = UserForm3.TextBox9.Value
Sheets("Fact").Range("d19").Value = UserForm3.TextBox19.Value
Sheets("Fact").Range("b20:c20").Value = UserForm3.ComboBox11.Value
Sheets("Fact").Range("a20").Value = UserForm3.TextBox10.Value
Sheets("Fact").Range("d20").Value = UserForm3.TextBox20.Value
Sheets("Fact").Range("b21:c21").Value = UserForm3.ComboBox12.Value
Sheets("Fact").Range("a21").Value = UserForm3.TextBox11.Value
Sheets("Fact").Range("d21").Value = UserForm3.TextBox21.Value
Sheets("Fact").Range("b22:c22").Value = UserForm3.ComboBox13.Value
Sheets("Fact").Range("a22").Value = UserForm3.TextBox12.Value
Sheets("Fact").Range("d22").Value = UserForm3.TextBox22.Value
Sheets("Fact").Select
End If
Unload UserForm3
End Sub