Hi all,
I have a macro that automatically generates a new file, moves some data from the source workbook, then saves the new file (no dialog to end user).
This new file must be in 2003 format.
Problem is, my end users are both 2003 and 2007 users.
Without modification to the code, if the user is in 2003 and executes, the file generated is of course 2003.xls If the user is in 2007 and executes the file is 2007.xlsx
I tried inserting the following:
This works great in 2007, the new workbook is indeed saves as 2003.xls.
However 2003 throws an error, I'd guess because FileFormat:=56 doesn't exist in 2003
So how do I write a script that will always save as 2003 format regardless of what version of excel my macro is being executed in?
Thanks!
I have a macro that automatically generates a new file, moves some data from the source workbook, then saves the new file (no dialog to end user).
This new file must be in 2003 format.
Problem is, my end users are both 2003 and 2007 users.
Without modification to the code, if the user is in 2003 and executes, the file generated is of course 2003.xls If the user is in 2007 and executes the file is 2007.xlsx
I tried inserting the following:
Code:
ActiveWorkbook.SaveAs fileName:=getFilePath & wbName, FileFormat:=56
This works great in 2007, the new workbook is indeed saves as 2003.xls.
However 2003 throws an error, I'd guess because FileFormat:=56 doesn't exist in 2003
So how do I write a script that will always save as 2003 format regardless of what version of excel my macro is being executed in?
Thanks!