Office App References w/Different Versions

D

Dan

My company has Office 2k, XP, and '03 running on various
desktops. I'm (on and Office '03 machine) try to develop
an MS Access app with some MS Excel references in it. I
gave the file to someone with an Office 2k machine and
they got errors regarding not having Excel 11.0. How can
I make the Excel reference not so version specific?
Thanks,
Dan
 
A

Allen Browne

One solution is to use late binding.

Instead of declaring the specific kind of object you want, just declare an
Object:
Dim obj As Object
Then the object and its properties and methods will be resolved at runtime,
based on the appropriate library, instead of being bound to a specific
object of a specific library at design time.
 
D

Dan

That did the trick. Thanks.
-----Original Message-----
One solution is to use late binding.

Instead of declaring the specific kind of object you want, just declare an
Object:
Dim obj As Object
Then the object and its properties and methods will be resolved at runtime,
based on the appropriate library, instead of being bound to a specific
object of a specific library at design time.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.




.
 

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