View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
R Avery R Avery is offline
external usenet poster
 
Posts: 220
Default Excel version reference problem

I don't suppose you have an automated way to convert all variables to
Object and to replace all set MYVAR = New MyObject to set MYVAR =
createobject("MyRef.MyOjbect") at the end of development?

In my environment, rapid application development is much more important
than run-time (since it is not very computationally intensive), and so I
definitely need the VBE's IntelliSense autocompleting everything... and
so a utility as defined above would definitely be of use.


Jon Peltier wrote:

The way I handle this, which is probably not optimal, is to use late
binding. Set no references, and declare your variables as Object instead
of the library-specific types. You don't get autosense in the VB Editor,
so you could convert to late binding at the end of development, and
supposedly late bound apps run more slowly. But it's faster than if it
throws an error, eh?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

R Avery wrote:

I have created an addin in XL 2002, and I am now about to distribute
it to users, but some of the users use XL 2000. These users have
complained that the add-in does not work because of reference errors.
Is there any way to programmatically fix the references when loading
(e.g., if Excel 10.0 Library is not available, try to load Excel 9.0
Library)?

Any help would be most appreciated.