Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run time error 1004 when trying to save a file in VBA 1

Status
Not open for further replies.

webgirl78

Technical User
Sep 30, 2008
3
GB
Hi
I'm trying to save a file using VBA. This works fine in Excel 2003 in the UK. However when the same code is run in Japanese Excel 2003, it generates a run time error 1004 with the following message;

Unable to set “Center Footer Property” in “PageSetup Class”

This is the code, where the error occurs;

Workbooks("MBI DATA.xls").Save

I am wondering whether this message might be caused by lack of printer drivers installed on the Japanese machine. Can anyone please help?
 
AFAIK, you can't use PageSetup if you don't have a default ptinter.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Hi PHV
Thanks for getting back to me. I don't actually use Page setup anywhere in my code but is it linked to the 'save' command in anyway?
Thanks!
 
Well, it couldn't be or no one could use Excel unless they had a printer.

I suggest you play around with your workbook object. Try activeworkbook.save and/or workbooks(1).save as I suspect there must be something peculiar with your label. Maybe use the Immediate Window and just interrogate the workbooks collection: print workbooks.count (should be >0), then print workbooks(1).name and see what the name is.

_________________
Bob Rashkin
 
Hi All
The Japanese team installed printer drivers on their computer and the code now runs - bizarre! Thanks for your suggestions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top