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

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
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,215,420
Messages
6,124,803
Members
449,190
Latest member
cindykay

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