Workbook.SaveAs

P

Paul

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.
 
R

Rob Bovey

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 *
 
T

Tom Ogilvy

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.aspx?scid=kb;en-us;242375
PRB: Office 97 Automation Client Fails After Re-compilation with Office 2000
or Office XP Type Library
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top