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

Jürgen Hellemans 1 Reputation point
2022-08-24T14:41:41.107+00:00

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:
quote:
Workbooks.Open "/Users/Jurgen/Rapportering.xlsx"
Sheets("EVM").Select
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••••ˇˇˇˇ
Unquote

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

Best regards,
Jürgen

No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Nico Leone 1 Reputation point
    2022-08-29T06:37:50.717+00:00

    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?!?!