I am attempting to create a PDF including several sheets from a Mac. (I am a PC user, but am doing this for a client who is Macs.) I referenced Ron de Bruin excellent post on the subject (https://www.rondebruin.nl/mac/mac005.htm), but there is one thing that is not working.

The workbook that I am converting to PDF includes three sheets: sheets 1 and 3 are landscape orientation and sheet 2 is portrait orientation. I included the following line of code for all sheets, as suggested by Ron:

ActiveSheet.PageSetup.Orientation = ActiveSheet.PageSetup.Orientation
However when I create the PDF all sheets - including sheet 2 - are set to landscape orientation.

Any ideas how to overcome this issue?

Thanks in advance for any help.