ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel version reference problem (https://www.excelbanter.com/excel-programming/303534-excel-version-reference-problem.html)

R Avery

Excel version reference problem
 
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.

Jon Peltier[_7_]

Excel version reference problem
 
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.



Keith Emery

Excel version reference problem
 
I have this issue as well. Unless you are using calls that
are not in 2000, you are best off compiling everything for
2000 (9)as it seems to be OK going up versions.

Alternatively, there are a couple of add ins you can use,
try: http://www.mvps.org/access/modules/mdl0022.htm


-----Original Message-----
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.
.


R Avery

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.




Jon Peltier[_7_]

Excel version reference problem
 
I don't have such a thing, nor have I heard of one. I use the MYVAR =
createobject("MyRef.MyOjbect") whenever possible even with early bound
projects, so that's one thing I need not change.

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

R Avery wrote:

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.







All times are GMT +1. The time now is 12:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com