Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Error 1004 - unable to set the orientation of the page setup class

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Error 1004 - unable to set the orientation of the page setup class

I have the reference to the excel 8 object library so I guess that's not it.



"Tom Ogilvy" wrote in message
...
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






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 340
Default Error 1004 - unable to set the orientation of the page setup class

E, is the default printer set to a printer that allows the orientation to be
changed? I've run into the problem before when the default printer is the
not the one I thought it was...

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

"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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Error 1004 - unable to set the orientation of the page setup class

I think I figured it out. I'm not attached to a printer. In regular excel, I
can't open the page setup because of that so that is what I'm guessing. It's
not easy for me right now to attach to a printer and this code has been
working for years, so I'm just going to trap the error and move on.


"Tom Ogilvy" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time error '1004': AutoFill method of Range class failed murkaboris Excel Discussion (Misc queries) 10 April 16th 09 09:06 PM
Error 1004 Copy method of worksheet class failed Ayo Excel Discussion (Misc queries) 3 March 28th 08 02:05 PM
R/T 1004 - Unable to get Button prop of Ws Class Jim May Excel Discussion (Misc queries) 3 January 2nd 08 05:19 PM
error 1004 Select method of Range class failed J.E. McGimpsey Excel Programming 1 September 12th 03 07:42 PM
error 1004 - metod Copy of class Range was failed Tom Ogilvy Excel Programming 1 September 10th 03 09:17 AM


All times are GMT +1. The time now is 04:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"