A report that I'm building has a graphic in the top right corner.
The user wants the final output to be printable to one page wide.
I have the following code at the end of the report production
The issue is that since the graphic isn't actually "in" a cell, it doesn't seem to be considered in the "fit all columns on one page" adjustment.
So if a particular report happens to have some wide data, the autofit leads to some wide columns and the graphic gets pushed to the right. In page layout or pagebreak view you can then see that the last column of the report will always be on the page, but the graphic is often split.
Any ideas on how to ensure the page is scaled to keep the graphic on as well?
The user wants the final output to be printable to one page wide.
I have the following code at the end of the report production
Code:
'adjust column widths
ws.columns("A:S").EntireColumn.AutoFit
With ws.PageSetup
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = False
End With
The issue is that since the graphic isn't actually "in" a cell, it doesn't seem to be considered in the "fit all columns on one page" adjustment.
So if a particular report happens to have some wide data, the autofit leads to some wide columns and the graphic gets pushed to the right. In page layout or pagebreak view you can then see that the last column of the report will always be on the page, but the graphic is often split.
Any ideas on how to ensure the page is scaled to keep the graphic on as well?