Macro to set print area

crismat09

New Member
Joined
Mar 18, 2009
Messages
12
Hi, I want to create a macro that will print a specific print area. The problem is that my I have different orientations. For instance: in one of my spreadsheets I need to print the first five pages as portrait and the following 3 on landscape. Is there a macro for my problem?
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Yes, but did not work. I get an error message. I thought about create a macro for each print area, but i don't want to have several macros in on spreadsheet.
 
Upvote 0
Thanks for the link. The problem is that I am not familiar with Vbasic. This is the first time that I am using a macro. Let me explain the whole scenario.
I have a worksheet that was developed on lotus and converted to excel. The macros from lotus don't work anymore.

The work sheet is divided in six tabs:
1st: one page, portrait, fit to 1 by 1 page, range (A1:I45)
2nd: three pages, portrait, fit to 1 by 3 pages, range (A1:M177)
3rd: five pages, portrait, fit to 1 by 5 pages, range (A1:P290), plus three pages, landscape, fit to 1 by 3 pages, range (Q291:AL433)
4th: one page, portrait, fit to 1 by 1 page, range (A1:I75), five pages, landscape, fit to 1 by 5 pages, range (K77:AA406)
5th: one page, portrait, fit to 1 by 1, range (A1:I87), twelve pages, landscape, fit to 1 by 12, range (J88:AE908), three pages, portrait, fit to 1 by 3, range (AF909:AR1106), three pages, portrait, fit to 3 pages, range (AS1107:BF1304), and three pages, portrait, fit to 3 pages, range (BH1305:BY1511).

Plus in need to figure out the page breaks.

I don't mind having a macro for each tab. As I said, it is my first experience with macros. Maybe there are other ways to do what I want, but I am not aware.

Do you think that you can help me?

Cris
 
Upvote 0

Forum statistics

Threads
1,216,076
Messages
6,128,669
Members
449,463
Latest member
Jojomen56

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top