Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Printing Selected areas to a single page

  Asked By: Rodolfo    Date: Jan 08    Category: MS Office    Views: 687
  

I am fairly new to programming in VBA. I have created a procedure that
selects non-contiguous columns and then sends them to print (i.e.
selects columns A:E, I:J). Unfortunately, the I:J columns get printed
to a second page even though there appears to be plenty of room on the
first sheet.

I have tried setting the ActiveSheet.PageSetup.FitTOPagesWide = 1, but
that doesn't seem to help. I have also tried hiding the columns F:H
without success.

Can anyone give me some suggestions?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Abbad Akhtar     Answered On: Jan 08

Use page  view to see if there is a manual page break set somewhere.

Hide the intermediate columns  and go to print  preview.

Select the relevant areas and set them as PrintArea. Then look at print
preview.

In other words try to do what you want manually, make sure it works, then use
code.

 
Answer #2    Answered By: Cais Nguyen     Answered On: Jan 08

Try this

Range("A:E,I:J").Select
Selection.PrintOut Copies:=1, Collate:=True

 
Didn't find what you were looking for? Find more on Printing Selected areas to a single page Or get search suggestion and latest updates.




Tagged: