Hey guys-

Right now i have a program that will automatically create a new workbook, populate it with some data, and then save it. The new workbook however is a ".xls" file since I'm using the VB editor in Microsoft excel 2003. When I try to run the same working program on a machine with Excel 2007 it crashes b/c it tries to create a ".xlsx" file and later in the program I refer back to the originally created workbook as a ".xls" file.

Now I know there is backwards compatibility with 2007 and you can create and work with ".xls" files in 2007 so my question is how can I ensure that when this program is run in 2007 it creats a ".xls" file everytime and not a ".xlsx"? It needs to be compatible with both versions of Excel.

I have tried appending & ".xls" to the end of the file_name variable I created that is used when the new workbook is created but that does not change the file extension when run in 2007. Any suggestions?