how to print a sheet by command

G

ghost

Hi,
I have a sheet with information. What I want to do is making two commands,
one for print the sheet portrait, and the other one landscape
Can any one help me plzzzzzzzzzzzz
Thanks!
 
D

Dave Peterson

How about recording a macro when you print landscape and record another when you
print portrait?
 
L

loudfish

can you give the code please

You need to come to the party. If you don't know how to record the
macros, you should ask.

More importantly, if you don't know how to record macros, then chances
are you won't know what to do with the code when someone takes the
time out to give it to you.

<cynical>
unless you are going to cut and paste it into some kind of assignment
</cynical>

Here's a taster of the solution, assuming you have activated the
worksheet that you want to modify.

ActiveSheet.PageSetup.Orientation = xlPortrait

And from the Menu, Tools, Macro...Record New Macro....Hit OK.
Do what you want to do (e.g change the page layout)
Then hit the Stop button.
Hit ALT F11, and you should see the code. You may need to click on
Modules and/or Module1 on the left.

HTH

Andrew
 
Top