Update Excel for Mac Version 16.64 (22081401) - VBA code .PageSetup.Orientation = xlLandscape

Jürgen Hellemans 1 Reputation point

Following VBA code doesn't work anymore after update Excell to version 16.64 (22081401):
"ActiveSheet.PageSetup.Orientation = xlLandscape"

Following code was working perfectly in the previous versions of Excell:
Workbooks.Open "/Users/Jurgen/Rapportering.xlsx"
ActiveSheet.PageSetup.PrintArea = "$A:$H"
ActiveSheet.PageSetup.Orientation = xlLandscape

ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
"/Users/Jurgen/" & Format(Date, "yyyymmdd") & "_Rapportering 2_EVM.pdf" _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False••••ˇˇˇˇ

The orientation of the sheet remains Portrait.
Is this an error in Excell or is their a new statement in VBA?

Best regards,

0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nico Leone 1 Reputation point

    Yes! I agree, it doesn't work! It's annoying me so much because my files aren't working at my job meaning I can't do my job. I can't print in landscape. Can Microsoft please clarify this?!?!

    0 comments No comments