Consulting

Results 1 to 3 of 3

Thread: one sheet print

  1. #1
    VBAX Mentor
    Joined
    Jun 2005
    Posts
    374
    Location

    one sheet print

    hello
    suppose i have a report of 50 rows and 5 columns.is there a way in vba to print the report on one page only , instead of 4 it offerd me?
    THANKS
    moshe

  2. #2
    try something like this
    [vba]Dim mystr As PageSetup
    Dim s As Worksheet
    Set s = Sheets("mysheet")
    s.PageSetup.FitToPagesTall = 1
    s.PageSetup.FitToPagesWide = 1
    s.PrintOut

    [/vba]

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    If you can change the layout try
    http://vbaexpress.com/kb/getarticle.php?kb_id=819
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •