Excel Page Settings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to add Code to my module in Access after it does a TransferSpreadSheet Export that will change the page settings in Excel to Landscape/Legal.

I have tried by putting in:

appxls.ActiveSheet.PageSetup.PrintArea = ""
appxls.ActiveSheet.PageSetup
appxls.Orientation = xlLandscape
appxls.PaperSize = xlPaperLegal


But I am getting a runtime error: Run-time error '438 (Object doesn't support this property or method).

What is wrong?

Please advise.

Thanks,

KSG Ent
 
i think it shoult be:

appxls.ActiveSheet.PageSetup.PrintArea = ""
with appxls.ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
end with


--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com



KSG Ent said:
I am trying to add Code to my module in Access after it does a
TransferSpreadSheet Export that will change the page settings in Excel to
Landscape/Legal.
I have tried by putting in:

appxls.ActiveSheet.PageSetup.PrintArea = ""
appxls.ActiveSheet.PageSetup
appxls.Orientation = xlLandscape
appxls.PaperSize = xlPaperLegal


But I am getting a runtime error: Run-time error '438 (Object doesn't
support this property or method).
 
Back
Top