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
| Private Sub UserForm_Initialize()
Dim I As Byte
Me.CommandButton3.Caption = "Ajouter"
With Me.ComboBox1
.AddItem 10
.AddItem 20
.AddItem 50
.AddItem 100
.AddItem 200
End With
With Me.ComboBox2
.AddItem "FSB"
.AddItem "FMA"
.AddItem "ACH"
.AddItem "STP"
End With
If Sheets("Base de Données").Cells(LI, 1).Value <> "" Then
For I = 1 To 11
Me.Controls("TextBox" & I).Value = Sheets("Base de Données").Cells(LI, CInt(Me.Controls("TextBox" & I).Tag)).Value
Next I
Me.ComboBox1.Value = Sheets("Base de Données").Cells(LI, 13).Value
Me.CommandButton3.Caption = "Modifier"
End If
End Sub
Private Sub CommandButton3_Click()
Dim I As Byte
For I = 1 To 11
Me.Controls("TextBox" & I).Text = UCase(Me.Controls("TextBox" & I).Text)
Cells(LI, CInt(Me.Controls("textBox" & I).Tag)).Value
Unload Me
RefProduit.Show
End Sub
Private Sub CommandButton2_Click()
Unload RefProduit
End Sub |
Partager