1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
|
Private Sub UserForm1_Initialize()
'**************************
'Affichage des données
'**************************
For i = 1 To 6
ComboBox1.AddItem Cells(1, 22 + i)
Next
suivi = Sheets("Suivi Client").Cells(ActiveCell.Row, 23)
proposition = Cells(ActiveCell.Row, 9)
Particularite = Cells(ActiveCell.Row, 25)
Provenance = Cells(ActiveCell.Row, 24)
Commentaire = Cells(ActiveCell.Row, 26)
Statut = Cells(ActiveCell.Row, 3)
nom = Cells(ActiveCell.Row, 5) + " " + Cells(ActiveCell.Row, 4)
gsm = Cells(ActiveCell.Row, 6)
Email = Cells(ActiveCell.Row, 8)
type_projet = Cells(ActiveCell.Row, 36)
valeur = Cells(ActiveCell.Row, 33)
duree = Cells(ActiveCell.Row, 34)
date_offre = Cells(ActiveCell.Row, 32)
mariee = Cells(ActiveCell.Row, 28)
enfants = Cells(ActiveCell.Row, 35)
ddn = Cells(ActiveCell.Row, 29)
revenu = Cells(ActiveCell.Row, 30)
profession = Cells(ActiveCell.Row, 31)
idclient = Cells(ActiveCell.Row, 22)
adresse = Cells(ActiveCell.Row, 7)
TextBox1.Value = suivi 'ok
TextBox2.Value = proposition 'ok
TextBox22.Value = type_projet 'ok
TextBox24.Value = date_offre 'ok
TextBox19.Value = duree 'ok
TextBox20.Value = valeur 'ok
TextBox3.Value = Particularite 'ok
TextBox4.Value = Provenance 'ok
TextBox5.Value = Commentaire 'ok
ComboBox1.Value = Statut 'ok
Label7.Caption = nom
Labe34.Caption = idclient
TextBox21.Value = ddn
TextBox7.Value = mariee 'ok
TextBox8.Value = enfants 'ok
TextBox9.Value = profession 'ok
TextBox10.Value = revenu 'ok
TextBox11.Value = gsm 'ok
TextBox12.Value = Email 'ok
TextBox13.Value = adresse 'ok
End Sub
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub CommandButton2_Click()
'*********************
'sauvegarde des données
'*********************
no_ligne = ActiveCell.Row
Cells(no_ligne, 23) = TextBox1.Value ' suivi
Cells(no_ligne, 9) = TextBox2.Value 'proposition
Cells(no_ligne, 25) = TextBox3.Value 'particularité
Cells(no_ligne, 24) = TextBox4.Value 'provenance
Cells(no_ligne, 26) = TextBox5.Value 'commentaire
Cells(no_ligne, 28) = TextBox7.Value 'mariée
Cells(no_ligne, 35) = TextBox8.Value 'nbre enfants
Cells(no_ligne, 31) = TextBox9.Value 'profession
Cells(no_ligne, 30) = TextBox10.Value 'revenu
Cells(no_ligne, 6) = TextBox11.Value 'gsm
Cells(no_ligne, 8) = TextBox12.Value 'mail
Cells(no_ligne, 7) = TextBox13.Value 'adresse
Cells(no_ligne, 34) = TextBox19.Value 'durée
Cells(no_ligne, 33) = TextBox20.Value ' valeur
Cells(no_ligne, 29) = TextBox21.Value 'ddn
Cells(no_ligne, 36) = TextBox22.Value 'type projet
Cells(no_ligne, 32) = TextBox24.Value 'date offre
Cells(no_ligne, 3) = ComboBox1.Value 'statut
Unload Me
End Sub |
Partager