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
| Sub PasAfficherStock0()
Application.EnableEvents = False 'empêche éxécution exécution change
Application.ScreenUpdating = False 'fige écran paendant macro ne pas oblié de remmetre avec true à la fin
Application.Calculation = xlCalculationManual
'déclaration varriables
Dim A As Long
Dim B As Long
Dim C As Long
'affectation valeur varriables
A = 8
B = A + 4
'selcteion cellule pour vérifiaction
Cells(A, 6).Select
'vérification que la cellule n'est pas vide
Do While Not (IsEmpty(ActiveCell))
'si cellule =0 on séléction sinon on met juste a jour les varriables
If Cells(A, 6) = 0 Then
Range(Cells(A, 2), Cells(B, 9)).Select
Selection.Delete Shift:=xlUp
'***************** ici je voudrais faire en sorte que les cellules sélectionnées disparaissent ***********************
Cells(A, 6).Select
Else
A = B + 1
B = A + 4
Cells(A, 6).Select
End If
Loop
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub |
Partager