ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   how to print a sheet by command (https://www.excelbanter.com/excel-discussion-misc-queries/141075-how-print-sheet-command.html)

ghost

how to print a sheet by command
 
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!


Dave Peterson

how to print a sheet by command
 
How about recording a macro when you print landscape and record another when you
print portrait?

ghost wrote:

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!


--

Dave Peterson

ghost

how to print a sheet by command
 
yes
can you give the code please

"Dave Peterson" wrote:

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

ghost wrote:

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!


--

Dave Peterson


loudfish

how to print a sheet by command
 
On May 1, 4:36 pm, ghost wrote:
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


Gord Dibben

how to print a sheet by command
 
ToolsMacroRecord New Macro.


Gord Dibben MS Excel MVP



On Tue, 1 May 2007 08:36:00 -0700, ghost
wrote:

yes
can you give the code please

"Dave Peterson" wrote:

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

ghost wrote:

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!


--

Dave Peterson




All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com