VBA: How do I switch to landscape?

  • Thread starter Thread starter Lazer
  • Start date Start date
L

Lazer

I've seen a bunch of people posting on various sites on how hard it i
to switch to landscape using VBA and Excel. But I need to do it.

Does anyone have a block of code that will do that?

Thanks!
Laze
 
Hi
try

Sub foo()
With ActiveSheet.PageSetup
.Orientation = xlLandscape
End With
End Sub
 
Frank - a dank!!!

That wasn't so hard as reported!

Thanks so much!!!
Laze
 
Hi
as a tip: Try recording a macro while manually performing this kind of
operations and have a look at the recording results
 

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