muhammad susanto
Well-known Member
- Joined
- Jan 8, 2013
- Messages
- 2,077
- Office Version
- 365
- 2021
- Platform
- Windows
hi all..
This lengthy statement adjusts the page setup properties on the active sheet, and is equivalent to this slower (but newer) method
cross post Faster Alternatives to VBA PageSetup - wellsr.com
here code :
how to make faster not slowly..
note : i use Ms Office 2010 till 2016
thank in advance
.sst
This lengthy statement adjusts the page setup properties on the active sheet, and is equivalent to this slower (but newer) method
cross post Faster Alternatives to VBA PageSetup - wellsr.com
here code :
VBA Code:
Sub SlowPageSetup_Loop()
For Each sht In ActiveWorkbook.Sheets
With sht.PageSetup
.Zoom = False
.Orientation = xlLandscape
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.CentimetersToPoints(5)
.BottomMargin = Application.InchesToPoints(0.5)
.HeaderMargin = Application.InchesToPoints(0.3)
.FooterMargin = Application.InchesToPoints(0.3)
.FitToPagesWide = 2
.FitToPagesTall = 1
.CenterHorizontally = True
.CenterVertically = False
End With
Next sht
End Sub
how to make faster not slowly..
note : i use Ms Office 2010 till 2016
thank in advance
.sst