Your three choices are:
1. Conditional compile using statements like
#ifdef EXCEL2003
etc.
2. Conditional run-time selection; this would use some run-time variable like this:
if bExcel2003)
{
}
3. You can take (2) to the extreme and have different DLLs depending on the Excel version.