Dim t As Variant, Y As Byte
Private Sub userform_initialize()
With Sheets("Fournisseurs")
t = .Range("a2:k" & .Cells(Rows.Count, 1).End(xlUp).Row): c1.List = t
End With
End Sub
Private Sub c1_Click()
For Y = 1 To 11: Controls("T" & Y) = c1.List(c1.ListIndex, Y - 1): Next Y
T4 = Format(T4, "00000"): T6 = Format(T6, "0# ## ## ## ##")
T7 = Format(T7, "0# ## ## ## ##")
End Sub
Private Sub modif_Click()
es
End Sub
Private Sub nouv_Click()
es
End Sub
Private Sub suppr_Click()
es
End Sub
Private Sub cmd1_Click()
Unload Me
End Sub
Private Sub c1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
c1.SetFocus: c1.DropDown
End Sub
Sub es()
With Sheets("Fournisseurs")
If ActiveControl.Name = "nouv" Then _
For Y = 1 To 11: .Cells(c1.ListCount + 2, Y) = Controls("T" & Y).Value: Next Y
If ActiveControl.Name = "modif" And c1.ListIndex > -1 Then _
For Y = 1 To 11: .Cells(c1.ListIndex + 2, Y) = Controls("T" & Y).Value: Next Y
If ActiveControl.Name = "suppr" And c1.ListIndex > -1 Then _
.Rows(c1.ListIndex + 2).Delete
End With
CreateObject("Wscript.shell").Popup " DEMANDE EFFECTUEE..... ", 1, " CONFIRMATION!!", vbInformation
Unload Me
End Sub