Object Library

G

GoTTi

I have written a macro in Excel 2002/XP which uses different MS Object
Libraries (Excel, Office & PowerPoint) and it works fine.
When I save the file in Excel 2003 the references get changed automatically
to version 11 and the file works but when I open the file in Excel 2002
again the Object Library for PowerPoint stays on version 11 all others
swiches back to version 10. This produces errors (Missing Object Library).

Does anyone have a clue why this Object Library doesn't swich back?

Thanks in advance
GoTTi
 
G

Guest

You are better off to use late binding. (Bind to the library at run time, not
at design time). Remove the references and use code similar to this

Dim appExcel As Object
Dim appWord As Object

Set appExcel = CreateObject("Excel.Application")
Set appWord = CreateObject("Word.Application")

appExcel.Quit
appWord.Quit
Set appExcel = Nothing
Set appWord = Nothing
 

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