I first attempted to record a macro for changing the page setup to print 2 tall by 1 wide. (code below)
I received an error message "Object variable or with block variable not set".
This macro is going inside of an excel add-in. Which leaves me to believe this may be a referencing error.
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.printarea = ""
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 2
End With
There were more options inside the WITH statement, but I shrunk it down for reading purposes. I tried searching for solutions online and tried a few snippets from others, but all came back with this error message.
Any ideas?
Thanks in advance!
Bookmarks