Sub TestStaple1600_bis()
Dim Question
Question = MsgBox("Voulez-vous imprimer le bon?", vbYesNo, "Impression Bon")
Select Case Question
Case vbYes
coloriage Range("L6:R13"), 49, xlDiagonalDown, xlDashDotDot
MsgBox "Oui, on on a voulu imprimer.", vbInformation, "Mise en forme pour impression"
Case vbNo
coloriage Range("L6:R13"), xlColorIndexNone, xlDiagonalDown, xlLineStyleNone
MsgBox "Impression annulée.", vbCritical, "Message à caractère informatif"
End Select
End Sub
Private Sub coloriage(Plage As Range, Fond As XlColorIndex, Bord As XlBordersIndex, BordStyle As XlLineStyle)
Plage.Interior.ColorIndex = Fond: Plage.Borders(Bord).LineStyle = BordStyle
End Sub