If you need to have you code running on multiple Excel versions, then you
have two choices:
1. Code with the earliest version you wish to support. and use early
binding. Restrict the statements used to only those that will work in the
earliest version you wish to support. Note that you may still encounter code
that does not work the same, if at all, in more recent versions of Excel.
2. Code with the latest version you wish to support and use late binding,
Restrict the statements used to only those that will work in the earliest
version you wish to support, Note that you may still encounter code that
does not work the same in earlier versions of Excel, especially with Excel
97.
There is actually a 3rd choice, but it is more difficult. One can construct
code so that some parts use version dependent code, but this gets tricky.
The overall task can oft be made easier if one codes in VB 6 (automating
Excel via VB 6), instead of Excel, because the VB 6 code would allow you to
use certain code that would not otherwise work in Excel 97, not to mention,
the code should execute faster and would be protected from prying eyes.