Sub Yemian ()
' button 1 Click Trigger to execute the following command
With Sheets (1). PageSetup
' For the function PageSetup like the page set on table 1, the following is the function's property modification before adding.
. Orientation = Xllandscape
' = Xllandscape ' Sets the mode to print
' = Xlportrait ' Set portrait print mode
. TopMargin = application.centimeterstopoints (0.5)
' = Top margin
. BottomMargin = application.centimeterstopoints (0.5)
' = Bottom margin
. LeftMargin = application.centimeterstopoints (0.5)
' = left margin
. RightMargin = application.centimeterstopoints (0.5)
' = right margin
. HeaderMargin = application.centimeterstopoints (0.3)
' = Page Header margin
. FooterMargin = application.centimeterstopoints (0.3)
' = Footer margin
. LeftHeader = "To: HR Department Date:" & Date
' = Left header
. CenterHeader = "&b &22 attendance form notice" & vbCrLf & "Requisition"
' = header in
. RightHeader = "Angel doors and Windows Co., Ltd. 2017-11-03"
' = Right Header
. LeftFooter = ""
' = left footer
. CenterFooter = ""
' = Middle Footer
. RightFooter = ""
' = Right footer
End with
End Sub
VBA, Settings, Excel,wps, page setup examples