Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.ScreenUpdating = False
Application.EnableEvents = False
ActiveSheet.PrintOut
[A3].Select
Dim temp1(), temp2(), temp3()
For Each C In [TABLO]
If C.Interior.ColorIndex <> xlNone Then
n = n + 1
ReDim Preserve temp1(1 To n)
ReDim Preserve temp2(1 To n)
ReDim Preserve temp3(1 To n)
temp1(n) = C.Address
temp2(n) = C.Interior.ColorIndex
temp3(n) = C.Font.ColorIndex
C.Interior.ColorIndex = xlNone
C.Font.ColorIndex = xlAutomatic
End If
Next C
ActiveSheet.PrintOut
Cancel = True
For i = 1 To n
Range(temp1(i)).Interior.ColorIndex = temp2(i)
Range(temp1(i)).Font.ColorIndex = temp3(i)
Next i
Application.ScreenUpdating = True
Application.EnableEvents = True
End Sub