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
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
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]
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'