Link to home
Start Free TrialLog in
Avatar of Michael Wolfstone
Michael WolfstoneFlag for United States of America

asked on

How do I set printing options that work for Excel 2003 created in Access 2003 with VBA

I am trying to code a spreadsheet from Access 2003 that will print in landscape on a 1-wide format.  I can get the landscape setting but the code for 1-wide is not working or holding in the saved spreadsheet.  I am trying with the following code:
    xlsSheet.pagesetup.Orientation = xllandscape
'    xlsSheet.pagesetup.printgridlines = True
    xlsSheet.pagesetup.printheadings = True
    xlsSheet.pagesetup.leftheader = "Weekly Handbag Report"
    xlsSheet.pagesetup.rightheader = "&D &T"
    xlsSheet.pagesetup.PrintArea = "A2:P" & LastLine
'    xlsSheet.pagesetup.FitToPagesTall = ""
    xlsSheet.pagesetup.fittopageswide = 1
    xlsSheet.Activate
    xlsSheet.pagesetup.printtitlerows = activesheet.rows(1).Address
ASKER CERTIFIED SOLUTION
Avatar of Simon
Simon
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Michael Wolfstone

ASKER

I tried both; together they worked.