bonjour
Sub Impression()
Dim dLig As Long, Lig As Long, bImprimer
With ThisWorkbook.Sheets("BdD")
aa = .Range("A2:D" & .Range("A" & Rows.Count).End(xlUp).Row).Value2 'matrice avec les données de BdD
End With
With Sheets("Etiquette")
ptr = 1
Do
.Range("E4:F5,D8:G11,E12:F13,E24:F25,D28:G31,E32:F33").ClearContents
For i = 0 To 1
Do
b = (aa(ptr, 3) <= 0)
If b Then ptr = ptr + 1
If UBound(aa) < ptr Then GoTo imprimer
Loop While b
.Range("E" & 4 + i * 20).Value = Format(aa(ptr, 1), "mm/dd/yyyy")
.Range("D" & 8 + i * 20).Value = aa(ptr, 2)
.Range("E" & 12 + i * 20).Value = aa(ptr, 4)
aa(ptr, 3) = aa(ptr, 3) - 1
bImprimer = True
Next
imprimer:
'.PrintOut 'plus tard printout au lieu de printpreview
.PrintPreview
bImprimer = False
Loop While ptr <= UBound(aa)
End With
End Sub