I have a macro/VBA code that I've developed in Office 2010 Excel which is working ok, just need to sort out some cosmetics.
However I need it to run on earlier versions of Excel (back to Office 97 or Excel 2002), and when I test it on a 2002 version of Excel (on another PC) it's giving Compile errors. The particular one I'm struggling with is in:
where the FileFormat:=xlExcel8 throws up a compile error. There are few SaveAs statements throughout the macro.
The TempDataPathFile variable is "d:\Data\Test\Temp Data.xls" and the PC I'm developing on has Excel set to save in compatibility mode by default, and the file containing the macro is a .xls file.
How can I modify the code so that it will compile and run on different versions of Excel?
Bookmarks