help with printing fit to page

gint32

Board Regular
Joined
Oct 8, 2014
Messages
131
Hello Everyone
Does anyone know of a vba way to evaluate the existing font size then maximise the font for printing or zoom prints for print purposes for each workbook.sheet in order to "expandtofit" to an A4 sheet 1X page wide and how ever many pages long printing in layout for "Landscape", regardless of the amount of rows within a workbook, at the moment the set up I have just loops loops through each worksheet and prints each sheet regardless of size, so sometimes the printouts are really too small to read for the end users and other times they are fine depending on the amount of rows on each worksheet. basically so the prints are as large as can be and use up the whole page(A4)

Code:
Sub OutP_LoopWorkbookSheets()

         Dim WS_Count As Integer
         Dim I As Integer
        
         ' Set WS_Count equal to the number of worksheets in the active
         ' workbook.
         WS_Count = ActiveWorkbook.Worksheets.Count
         

         ' Begin the loop.
         For I = 1 To WS_Count

            'I need the code for large prints vba needed here.(fit to page)
            '
                          ActiveWorkbook.Worksheets(I).PrintOut
                        
                      
                Else
                  
            End If
            
         
          Next I

         

      End Sub
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

Forum statistics

Threads
1,144,388
Messages
5,724,068
Members
422,532
Latest member
KiwiGrue

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
Top