ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Scaling for printing (https://www.excelbanter.com/excel-programming/334773-scaling-printing.html)

chris100[_5_]

Scaling for printing
 

I am working on a macro that temporarily hides rows and columns for
printing. On one print 'job' i need to increase the scaling (as if
going to file, page setup, scaling, adjust to) and set to change to
what ever i have pre-defined the scale to be. After i print, i need to
set it back to whatever it originally was.

I searched for this on the forum, but didn't find something that was
exactly what i need. Any help for this novice much appreciated!


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877


STEVE BELL

Scaling for printing
 
Have you tried to use the PageSet-Up to set the print to:
Fit to x pages wide & y pages tall
You can do this manually or in code.

--
steveB

Remove "AYN" from email to respond
"chris100" wrote in
message ...

I am working on a macro that temporarily hides rows and columns for
printing. On one print 'job' i need to increase the scaling (as if
going to file, page setup, scaling, adjust to) and set to change to
what ever i have pre-defined the scale to be. After i print, i need to
set it back to whatever it originally was.

I searched for this on the forum, but didn't find something that was
exactly what i need. Any help for this novice much appreciated!


--
chris100
------------------------------------------------------------------------
chris100's Profile:
http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877




chris100[_6_]

Scaling for printing
 

Thanks SteveB, that works great for the first page but for the second
(where columns are hidden), only half the page is filled up. I'm
pretty sure i can't use the same settings (pages high by pages wide)
for both so would have to change one temporarily.

Is this possible at all?


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877


STEVE BELL

Scaling for printing
 
Almost anything is possible in Excel.
The issue is solving "How to get there from here!"

If you can think of a systematic way of doing it manually -
you can transform it into code.
Sometimes just recording what you do and than editing the
code is enough to do it.

And this site is a great place to solicit help.

So - let us know how you would do it and we'll help
build some code...

--
steveB

Remove "AYN" from email to respond
"chris100" wrote in
message ...

Thanks SteveB, that works great for the first page but for the second
(where columns are hidden), only half the page is filled up. I'm
pretty sure i can't use the same settings (pages high by pages wide)
for both so would have to change one temporarily.

Is this possible at all?


--
chris100
------------------------------------------------------------------------
chris100's Profile:
http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877




chris100[_8_]

Scaling for printing
 

Hi SteveB

Thanks for the advice. I just recently figured out how to record macros
and adapt the code to my needs. Good method for my level of programming.
In this case, like you say, i just recorded the macro - went through the
steps and cut and paste into my own macro. Looks a little messy but
works all the same.

Thanks to all who give help here.


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877


STEVE BELL

Scaling for printing
 
Chris,

Looking good...

The next step in your progress is to learn how to eliminate any selecting.

example
Range("A1").Select
Selection.Copy
Range("B1").Select
ActiveSheet.Paste

becomes
Range("A1").Copy _
Destination:=Range("B1")
or
Range("B1")=Range("A1")

And if you specify sheet names - you can do this between sheets
Specify workbook names - and you do this between workbooks.

Of course this is a very basic example...

Keep on Exceling...
--
steveB

Remove "AYN" from email to respond
"chris100" wrote in
message ...

Hi SteveB

Thanks for the advice. I just recently figured out how to record macros
and adapt the code to my needs. Good method for my level of programming.
In this case, like you say, i just recorded the macro - went through the
steps and cut and paste into my own macro. Looks a little messy but
works all the same.

Thanks to all who give help here.


--
chris100
------------------------------------------------------------------------
chris100's Profile:
http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877




okaizawa

Scaling for printing
 
Hi,

if your setting for printing(hidden column, scaling, etc) are all the same
everytime, custom view (View Custom Views) also might help you.
you can select a view from the built-in dropdown on toolbar.
to switch automatically, write a few code, for example,

ActiveWorkbook.CustomViews.Add ViewName:="normal", _
PrintSettings:=True, RowColSettings:=True
ActiveWorkbook.CustomViews("print").Show
ActiveSheet.PrintPreview
ActiveWorkbook.CustomViews("normal").Show

About viewing workbooks and worksheets
http://office.microsoft.com/en-us/as...984331033.aspx

--
HTH,

okaizawa


chris100 wrote:
I am working on a macro that temporarily hides rows and columns for
printing. On one print 'job' i need to increase the scaling (as if
going to file, page setup, scaling, adjust to) and set to change to
what ever i have pre-defined the scale to be. After i print, i need to
set it back to whatever it originally was.

I searched for this on the forum, but didn't find something that was
exactly what i need. Any help for this novice much appreciated!


chris100[_9_]

Scaling for printing
 

okaizawa,

Thanks for the help. Will try a few differnent ways.


--
chris100
------------------------------------------------------------------------
chris100's Profile: http://www.excelforum.com/member.php...o&userid=25166
View this thread: http://www.excelforum.com/showthread...hreadid=387877



All times are GMT +1. The time now is 08:11 AM.

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