VBA printing on one page issue

normpam

Active Member
Joined
Oct 30, 2002
Messages
355
In the following code I have 'FitToPagesWide' and tall = 1, but when run, it still shows up on two pages. What am I missing here?
Much thanks for any help.

VBA Code:
Sheets("Original").Select
    Do Until ActiveSheet.Name = "zzz"
    ActiveSheet.Next.Select
    RowNum = Range("A10000").Offset.End(xlUp).Row
    Range("a2:P" & RowNum).Select
    If ActiveSheet.Name = "zzz" Then
    Sheets("Original").Select
    End
    End If
 
    With ActiveSheet.PageSetup
        .PrintTitleRows = "$1:$1"
        .PrintTitleColumns = ""
        .Orientation = xlLandscape
        .FitToPagesWide = 1
        .FitToPagesTall = 1
    End With
       
    Selection.PrintPreview
 
Last edited by a moderator:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Does the below make a difference.
Btw, can you please use code tags in future as not using them makes your code hard to read.


Code:
With ActiveSheet.PageSetup
  .PrintTitleRows = "$1:$1"
  .PrintTitleColumns = ""
  .Orientation = xlLandscape
  [COLOR="#FF0000"].Zoom = False[/COLOR]
  .FitToPagesWide = 1
  .FitToPagesTall = 1
End With
 
Upvote 0

Forum statistics

Threads
1,215,136
Messages
6,123,251
Members
449,093
Latest member
Vincent Khandagale

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