Different versions of Excel

B

bhsmaths

Hi,
I have written a VB6 program which accesses both Word and Excel files. This
was written using Office 2003. When I use the program on a machine also
using Office 2003, there is no problems (these are about 99% of all our
machines). However, a small number of machines use office 2000. Although the
Word portion of the code works fine, the Excel code does not open of my
Excel files. Are there differences between the different versions of Excel.
I noted that when I created a reference to Excel in my VB project, the
referenced file was the Excel.exe file and not a .dll or .ocx etc. Could
this be the problem.
Thank you for any suggestions.
Allan R Smyth
Blakehurst High School (Mathematics)
Australia.
 
T

TC

Naturally there are various differences between the different versions
of a product. If there weren't - it wouldn't be a different version!

Generally the best way to handle this is to use "late binding", instead
oif "early binding" as you are currently doing.

Early binding:
dim w as word.application
dim d as word.document
(requires a reference to the word object library)
(might not work with earlier versions!)

Late binding:
dim w as object
dim d as object
(does NOT require a reference to the word object library)
(WILL wok with earlier versions, as long as you don't use
any features that are only available in the later version)

Look up those two terms on the wbe or the groups, you should find lots
of hits.

HTH,
TC [MVP Access]
 

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