• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Run-Time Error 1004 Unable to sett the RightHeader property of the PageSetupClass

ThrottleWorks

Excel Ninja
Hi,

I am running a macro for setting Header of the files.
I have not prepapred this macro, the person who has developed this has left the firm.

When trying to run the macro I get the following bug.
"Run-Time Error 1004 Unable to sett the RightHeader property of the PageSetupClass".

Can anyone please tell me what will be cause.
 

Attachments

Header.xls is a 97-2003 Excel file

It works fine in Excel 2010

What version are you using ?

I think you should also save the file as a Macro file eg: *.xlm not *.xls
 
I am using Excel 2010 only, I forgot to mention, I am the only person who is getting this error.
The macro is running fine on other PCs, should have mentioned earlier.

Version is 14, the entire value is 14.0.6112.5000 (32-bit)

P.S. - Sir facing same problem with XLM file also.
 
Here is a wild stab

Try changeing the two lines
wb.ActiveSheet.PageSetup.RightHeader = Sclassification
wb.ActiveSheet.PageSetup.LeftHeader = ""

to:
ActiveSheet.PageSetup.RightHeader = Sclassification
ActiveSheet.PageSetup.LeftHeader = ""
 
Back
Top