snb
Verenigingslid
- Lid geworden
- 12 jun 2008
- Berichten
- 20.329
Of
Code:
Sub Printen()
On Error Resume Next
With Range("D4,C26,D26,E26,G26")
.Interior.ColorIndex = xlNone
With .SpecialCells(xlCellTypeBlanks)
If Err.Number = 0 Then
With .Cells(1)
MsgBox Cells(1, .Column).Value & " ontbreekt"
.Interior.Color = vbRed
.Select
End With
Else
With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.6)
.RightMargin = Application.InchesToPoints(0.45)
.TopMargin = Application.InchesToPoints(0.65)
.BottomMargin = 0
.HeaderMargin = 0
.FooterMargin = 0
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
ActiveWindow.SelectedSheets.PrintPreview
End If
End With
End With
End Sub