As you are probably aware there are several versions of Excel, all of which have subtle variations in the way they work, and the features that they provide.

In the vast majority of cases this will not affect the code you need to write to perform the tasks required on the document (unless you use 'new' features which aren't available in the version of Excel which is installed). There can however be a problem when your program tries to start Excel.

The trouble is that with your installation package you installed a specific version of the Excel type library, which could easily be different from the version of Excel which is installed on the users computer. Even though the installed version provides essentially the same functionality as the one on your development computer, Windows may realise that there are version differences and stop your program from using something that it thinks is likely to cause errors.

This has become even more pronounced recently, as versions of Excel now get you to install an "Excel.exe" file along with your program, rather than the traditional "ExcelX.olb" file

Another issue is that Excel may not even be installed, which can stop your program from even starting!

The best way around these issues is to use a Late-Bound connection to Excel (see next section), with extra error handling around the first line (CreateObject/GetObject) to deal with the possibility that it isn’t installed.


.