Dim lig As Long
Dim nomfeuille1 As String
Dim col As String
Dim cellule As Range
Private Sub IndexSemaines_Change()
With Me.IndexSemaines
If .ListIndex = -1 Then Exit Sub
lig = CLng(.List(.ListIndex, (.ColumnCount - 1)))
End With
With Sheets(nomfeuille1)
Me.Renault = .Range("c" & lig)
Me.Peugeot = .Range("b" & lig)
Me.Citroen = .Range("d" & lig)
Me.Total = .Range("c" & lig) + .Range("b" & lig) + .Range("d" & lig)
Me.Iledefrance = .Range("f" & lig)
Me.Province = .Range("G" & lig)
Me.Reste = .Range("h" & lig)
Me.Total2 = .Range("i" & lig)
Me.Dispo = Format(.Range("j" & lig), "0,00%")
End With
End Sub
Private Sub UserForm_Initialize()
'les valeurs des cellules doit être modifées si besoin"
col = "a"
nomfeuille1 = "NiveauSpare"
With IndexSemaines
.Clear
.ColumnCount = 2
.ColumnWidths = "50;0"
For Each cellule In Sheets(nomfeuille1).Range("a4:a" & Sheets(nomfeuille1).Range("a65536").End(xlUp).Row)
.AddItem cellule.Value
.List(.ListCount - 1, .ColumnCount - 1) = cellule.Row
Next cellule
End With
'lig = CLng(ListBox1.List(ListBox1.ListIndex, (ListBox1.ColumnCount - 1)))
End Sub
Private Sub CommandButton1_Click()
Etat_du_Parc.Hide
Load Menu
Menu.Show
End Sub
Private Sub CommandButton2_Click()
Etat_du_Parc.Hide
End Sub