Bonjour le forum
Dans cet extrait de code la boucle me ralentit l'execution de la procédure ,comme c'est moi qui l'a ecrit et n'etant pas un pro du code
je souhaiterais savoir si on peut faire une modif pour l'améliorer
merci de votre aide
Private Sub CommandButton11_Click() 'imprime Dim r As Integer
Dim ActivationEvents As Long
ActivationEvents = Application.EnableEvents
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlManual
For r = 3 To Range("a242").End(xlUp).Row
If (Cells(r, "a")) = "0" Or IsEmpty(Cells(r, "a")) And IsEmpty(Cells(r, "c")) And IsEmpty(Cells(r, "d")) And IsEmpty(Cells(r, "b")) Then Rows(r).Hidden = True
Next r
Application.Calculation = xlAutomatic
Dans cet extrait de code la boucle me ralentit l'execution de la procédure ,comme c'est moi qui l'a ecrit et n'etant pas un pro du code
je souhaiterais savoir si on peut faire une modif pour l'améliorer
merci de votre aide
Private Sub CommandButton11_Click() 'imprime Dim r As Integer
Dim ActivationEvents As Long
ActivationEvents = Application.EnableEvents
Application.EnableEvents = False
Application.ScreenUpdating = False
Application.Calculation = xlManual
For r = 3 To Range("a242").End(xlUp).Row
If (Cells(r, "a")) = "0" Or IsEmpty(Cells(r, "a")) And IsEmpty(Cells(r, "c")) And IsEmpty(Cells(r, "d")) And IsEmpty(Cells(r, "b")) Then Rows(r).Hidden = True
Next r
Application.Calculation = xlAutomatic