HSV
Inventaris
- Lid geworden
- 18 jul 2008
- Berichten
- 20.317
- Office versie
- Office 365
Code:
Private Sub commandbutton1_Click()
Unload Me
Application.ScreenUpdating = False
With ActiveSheet
With .PageSetup
On Error Resume Next
.PaperSize = xlPaperA3
If Err.Number > 0 Then
MsgBox "geen A3 printer aanwezig"
Exit Sub
End If
On Error GoTo 0
.Parent.Range("A2:A40,e2:f40").Font.Bold = True
.PrintArea = .Parent.Range("A1", .Parent.Cells(Rows.Count, 9).End(xlUp)).Address
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
.CenterVertically = True
.CenterHorizontally = True
.CenterHeader = "&""Calibri,bold""&35" & "Geplande"
.Orientation = xlLandscape
.CenterFooter = "&""Calibri""&20" & " Dienst &""Calibri""&10" & vbLf & "Geprint door " & StrConv(Replace(Environ("username"), ".", " "), 3) & " op " & "&D"
End With
.PrintPreview
.Range("A2:A40,e2:f40").Font.Bold = False
End With
End Sub
Laatst bewerkt: