Please help..

  • Thread starter Thread starter sameer27p
  • Start date Start date
S

sameer27p

i want to change the page setup to landscape and margins to 0.25 in th
macro written in an excel sheet..does anyone have a macro code for thi
 
i want to change the page setup to landscape and margins to 0.25 in the
macro written in an excel sheet..does anyone have a macro code for this
?


Public Sub MarginLandscape()

With ActiveSheet.PageSetup
.LeftMargin = Application.InchesToPoints(0.25)
.RightMargin = Application.InchesToPoints(0.25)
.TopMargin = Application.InchesToPoints(0.25)
.BottomMargin = Application.InchesToPoints(0.25)
.Orientation = xlLandscape
End With

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top