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
| 'Sauvegarde le contenu des ListBox lors de la fermeture du UserForm
'Private Sub UserForm_Initialize()
' TextBox1.Value = GetSetting("Mes parametres", "ListBox2", "Valeur TextBox1")
' TextBox2.Value = GetSetting("Mes parametres", "ListBox3", "Valeur TextBox2")
'End Sub
Private Sub UserForm_Initialize()
ListBox2.RowSource = Range("L6:L12").Address
P = Array("6", "7", "8", "9", "10", "11", "12")
End Sub
Private Sub CommandButton1_Click()
Dim n As Integer, y As Integer
Range("c12").Clear
With Me.ListBox2
For n = 0 To .ListCount - 1
If .Selected(n) = True Then
y = y + 1
[c12] = [c12] & " / " & .List(n)
End If
Next n
End With
End Sub
Private Sub UserForm_Initialize()
ListBox3.RowSource = Range("M6:M12").Address
P = Array("6", "7", "8", "9", "10", "11", "12")
End Sub
Private Sub CommandButton2_Click()
Dim n As Integer, y As Integer
Range("c16").Clear
With Me.ListBox3
For n = 0 To .ListCount - 1
If .Selected(n) = True Then
y = y + 1
[c16] = [c16] & " / " & .List(n)
End If
Next n
End With
End Sub
'Sauvegarde le contenu des ListBox lors de la fermeture du UserForm
'Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
' SaveSetting "Mes parametres", "ListBox2", "Valeur TextBox1", TextBox1.Value
' SaveSetting "Mes parametres", "ListBox3", "Valeur TextBox2", TextBox2.Value
'End Sub
Private Sub CloseButton_Click()
SelectProd.Hide
End Sub |
Partager