Norma Posy
asked on
Page orientation for an Excel object
What is the syntax for assigning the constant xlLandscape to an object set as an Excel spreadsheet?
ASKER
I have collection of global xl constants.
xlLandscape = 2 is one of them
=====
Dim oXL As Object
Set oXL = CreateObject("Excel.Applic ation")
With oXL
.Visible = True
.Workbooks.Add
.PageSetup.Orientation = xlLandscape ' <<<< Program bombs here
"Runtime error 438"
"Object doesn't support this property or method"
xlLandscape = 2 is one of them
=====
Dim oXL As Object
Set oXL = CreateObject("Excel.Applic
With oXL
.Visible = True
.Workbooks.Add
.PageSetup.Orientation = xlLandscape ' <<<< Program bombs here
"Runtime error 438"
"Object doesn't support this property or method"
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thank you.
It is a matter of what object has which property.
It is a matter of what object has which property.
Open in new window