1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| Private Sub Workbook_Open()
If variable.Cells(1, 10) < Month(Now()) Then
majauto.Show
End If
menu.Show
End Sub
Private Sub UserForm_Activate()
majauto.etat.Caption = "initialisation"
majauto.ProgressBar1.Value = 0
majauto.etat.Caption = "incrémentation paiement client"
majauto.Repaint
For i = 1 To numerosaff.Cells(Rows.Count, 13).End(xlUp).Row
If StrComp(numerosaff.Cells(i, 13), "R") = 0 Then
numerosaff.Cells(i, 16) = numerosaff.Cells(i, 16) + 1
End If
majauto.ProgressBar1.Value = (i / numerosaff.Cells(Rows.Count, 13).End(xlUp).Row) * 100
Next
majauto.Hide
variable.Cells(1, 10) = variable.Cells(1, 10) + 1
End Sub |