View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Error 1004 - unable to set the orientation of the page setup class

Do you have a valid reference to the Excel application in Tools=References.
It is possible that you don't. If you are are talking about printing out
orientation portrait or landscape, the constants are

? xlLandscape
2
? xlPortrait
1

But I the weren't defined (no reference to the excel object library), they
would be seen as a value of Zero which would probably raise the error you
describe.

--
Regards,
Tom Ogilvy

"E Sullivan" wrote in message
...
Hi,

I have a VB6 programming accessing excel. I had previously had no trouble
setting the orientation of the sheet but now that I have a windows xp, I

am
getting the above error. I have Office 97 installed on my machine.

thanks