ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Workbook.SaveAs (https://www.excelbanter.com/excel-programming/275236-workbook-saveas.html)

Paul

Workbook.SaveAs
 
I have just recently upgraded my office products to office
xp but I still have clients running my software using
earlier versions of the product. My software heavily
relies on automation in excel to produce reports. I ran
into a problem though with the saveas method in excel. I
compile against the 10.0 object and when run against the
9.0 object, my code blows up. I have resorted to using
late binding to get around this for now but would like to
know if there is something better as late binding doesn't
give compile errors.

Rob Bovey

Workbook.SaveAs
 
Hi Paul,

You'll need to compile against the earliest version of Excel that your
application plans to run with. The object libraries are always forward
compatible, but very often not backward compatible. Other than this, late
binding is your only option.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Paul" wrote in message
...
I have just recently upgraded my office products to office
xp but I still have clients running my software using
earlier versions of the product. My software heavily
relies on automation in excel to produce reports. I ran
into a problem though with the saveas method in excel. I
compile against the 10.0 object and when run against the
9.0 object, my code blows up. I have resorted to using
late binding to get around this for now but would like to
know if there is something better as late binding doesn't
give compile errors.




Tom Ogilvy

Workbook.SaveAs
 
You can use early binding while you are developing your application, then
change to late binding for distribution. Understanding you are going to do
this can help make the change less painful.

Late binding is probably the cleanest way to get around the problem you
describe - I am not sure I know another.

This article isn't exactly your situation, but does provide some insights
and recommendations:

http://support.microsoft.com/default...b;en-us;242375
PRB: Office 97 Automation Client Fails After Re-compilation with Office 2000
or Office XP Type Library

--
Regards,
Tom Ogilvy


"Paul" wrote in message
...
I have just recently upgraded my office products to office
xp but I still have clients running my software using
earlier versions of the product. My software heavily
relies on automation in excel to produce reports. I ran
into a problem though with the saveas method in excel. I
compile against the 10.0 object and when run against the
9.0 object, my code blows up. I have resorted to using
late binding to get around this for now but would like to
know if there is something better as late binding doesn't
give compile errors.





All times are GMT +1. The time now is 02:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com