Ken1000
04-25-2006, 04:37 AM
Hi. I am using Office 2003.
I made an excel file which includes the reference
Office Word 11.0 Object library within it. All macros
in this excel file work fine. I saved this file to be
backwards compatible (to be able to work with
earlier Excel versions).
I emailed this same file to a friend, who has Excel
2003. When he runs the same macros within it, he
gets an error message that this reference (the Office
Word 11.0 Object library) is not found. Thus, the
dependent code does not work on his end.
I thought that when I saved my excel file to include this
reference and gave him a copy, that any user with the
same copy should be able to access/use the same
specified library item(s) automatically.
If I am wrong in this, could you please tell me if there
is any VBA code that could automatically check to see
if the needed library reference was "attached" (included)
and if not, would indeed attach/include itself prior to
running any macro code?
Also, if an intended user did have an earlier Excel version,
could VBA code be added that could determine the Excel
version and find the correct matching reference in the
library and attach it? For example, while Excel 2003
"matches" with Office Word 11.0 object library, an earlier
Excel version may need a different Word xx.x object in
order to function properly.
Thank you very much.
Ken
I made an excel file which includes the reference
Office Word 11.0 Object library within it. All macros
in this excel file work fine. I saved this file to be
backwards compatible (to be able to work with
earlier Excel versions).
I emailed this same file to a friend, who has Excel
2003. When he runs the same macros within it, he
gets an error message that this reference (the Office
Word 11.0 Object library) is not found. Thus, the
dependent code does not work on his end.
I thought that when I saved my excel file to include this
reference and gave him a copy, that any user with the
same copy should be able to access/use the same
specified library item(s) automatically.
If I am wrong in this, could you please tell me if there
is any VBA code that could automatically check to see
if the needed library reference was "attached" (included)
and if not, would indeed attach/include itself prior to
running any macro code?
Also, if an intended user did have an earlier Excel version,
could VBA code be added that could determine the Excel
version and find the correct matching reference in the
library and attach it? For example, while Excel 2003
"matches" with Office Word 11.0 object library, an earlier
Excel version may need a different Word xx.x object in
order to function properly.
Thank you very much.
Ken