View Single Post
 
Old 07-19-2020, 05:01 PM
trevorc trevorc is offline Windows 7 32bit Office 2013
Competent Performer
 
Join Date: Jan 2017
Posts: 174
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default

Thanks for the reply, but i can't get the line of code below to work.
As shown in the example from the link you provided. Any ideas?
Then in Excel run this: MsgBox PageSetup.PaperSize. This will give you the new constant value assigned to that paper size in Excel. Then change .PaperSize = xlPaperUser in your macro to .PaperSize = & whatever the constant is that you just found.

Code:
Sub AAA()
With ActiveSheet.PageSetup
MsgBox PageSetup.PaperSize
End With
Exit Sub
Reply With Quote