Hi -
I am working on a macro that prints select sheets to a PDF output. For some reason, it will always print the first page in portrait mode even when I define in page setup to print it as landscape. If I put a page before it, that new first page will print as portrait and then my old "page 1" will print the correct way in landscape mode.
If I manually check the page setup, the page in question is in landscape mode, so I'm not sure how or why it's turning to portrait - and it seems to only affect the first page printed. When selecting which sheets to print, I use this array formula:
Dim arr() As String
Dim counter As Integer
ReDim Preserve arr(Sheets.Count - 5)
For i = 5 To Sheets.Count
arr(counter) = Sheets(i).Name
counter = counter + 1
Next i
Sheets(arr()).Select
Not sure if that might have any impact on the issue.
Does anyone have any experience with this or know how to fix it? Thank you!
I am working on a macro that prints select sheets to a PDF output. For some reason, it will always print the first page in portrait mode even when I define in page setup to print it as landscape. If I put a page before it, that new first page will print as portrait and then my old "page 1" will print the correct way in landscape mode.
If I manually check the page setup, the page in question is in landscape mode, so I'm not sure how or why it's turning to portrait - and it seems to only affect the first page printed. When selecting which sheets to print, I use this array formula:
Dim arr() As String
Dim counter As Integer
ReDim Preserve arr(Sheets.Count - 5)
For i = 5 To Sheets.Count
arr(counter) = Sheets(i).Name
counter = counter + 1
Next i
Sheets(arr()).Select
Not sure if that might have any impact on the issue.
Does anyone have any experience with this or know how to fix it? Thank you!