Try the following code... it will Help you!
Code:
Application. ScreenUpdating = False
Range("cpp_flag") = 1
Range("B:G,L:N,T:AK").EntireColumn.Hidden = True
ActiveSheet.PageSetup.PrintArea = "$A$7:$S$37"
With ActiveSheet.PageSetup
.TopMargin = Application.InchesToPoints(0.2)
.BottomMargin = Application.InchesToPoints(0.5)
.LeftMargin = Application.InchesToPoints(0.17)
.RightMargin = Application.InchesToPoints(0.18)
.HeaderMargin = Application.InchesToPoints(0)
.FooterMargin = Application.InchesToPoints(0)
.Orientation = xlPortrait
.CenterVertically = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
End Sub
Bookmarks