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
|
Option Explicit
Private Sub BoutonRetour_Click()
Continuer = False
Unload Form_Produit
End Sub
Private Sub BoutonValider_Click()
Dim CtrI As Long
Dim CtrJ As Long
If List_Produits.ListCount > 0 Then
For CtrI = 0 To List_Produits.ListCount - 1
If List_Produits.Selected(CtrI) = True Then
For Each CelluleProduits In AireProduits
If CelluleProduits = List_Produits.List(CtrI) Then
With CelluleProduits
.Offset(0, 1).Value = LabelLibelle
.Offset(0, 2).Value = CDbl(LabelPrixTarif)
.Offset(0, 2).NumberFormat = "#,##0.00 "
End With
Exit For
End If
Next CelluleProduits
End If
Next CtrI
End If
End Sub
Private Sub List_Produits_Click()
Dim CtrI As Long
Dim CtrJ As Long
If List_Produits.ListCount > 0 Then
For CtrI = 0 To List_Produits.ListCount - 1
If List_Produits.Selected(CtrI) = True Then
For Each CelluleProduits In AireProduits
If CelluleProduits = List_Produits.List(CtrI) Then
Application.Goto CelluleProduits.Offset(-10, 0), Scroll:=True
CelluleProduits.Activate
Exit For
End If
Next CelluleProduits
For CtrJ = LBound(MatriceTarifs, 1) To UBound(MatriceTarifs, 1)
If MatriceTarifs(CtrJ, 1) = List_Produits.List(CtrI) Then
LabelLibelle = MatriceTarifs(CtrJ, 2)
LabelPrixTarif = Format(MatriceTarifs(CtrJ, 3), "#,##0.00 ")
Exit For
End If
Next CtrJ
End If
Next CtrI
End If
End Sub
Private Sub UserForm_Click()
End Sub |
Partager