![]() |
SaveAs Type Problem
Maybe try
wbTemp.SaveAs Filename:="D:\Test", FileFormat:=xlExcel9795 -- __________________________________ HTH Bob "Nigel" wrote in message ... Hi All Curious issue has arisen with xl2007 (SP1); I am creating a new workbook based on a template file (xlt) that was created using xl2003 (SP3). The new workbook is created and assigned to a workbook object wbTemp.Which I then wish to save in xl2003 format. I tried without success both of the following.... wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795 wbTemp.SaveAs "D:\Test.xls", xlExcel9795 When run it I get Run-time error 1004 - Method of 'SaveAs' of object '_Workbook' failed What is wrong? PS if I remove the FileFormat parameter it works but of course the format reverts to xl2007 with an xls extension! -- Regards, Nigel |
SaveAs Type Problem
Hi Nigel
See also http://www.rondebruin.nl/saveas.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "Nigel" wrote in message ... Hi All Curious issue has arisen with xl2007 (SP1); I am creating a new workbook based on a template file (xlt) that was created using xl2003 (SP3). The new workbook is created and assigned to a workbook object wbTemp.Which I then wish to save in xl2003 format. I tried without success both of the following.... wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795 wbTemp.SaveAs "D:\Test.xls", xlExcel9795 When run it I get Run-time error 1004 - Method of 'SaveAs' of object '_Workbook' failed What is wrong? PS if I remove the FileFormat parameter it works but of course the format reverts to xl2007 with an xls extension! -- Regards, Nigel |
SaveAs Type Problem
Hi Bob
I tried all combinations with and without the xls extension without success, I tried file formats xlExcel8 as well as xlExcel9795 and still no joy, I tried using the enumeration values for these 43 and 56 again without success. In desperation I recorded the file save process and modified as follows, it now works. wbTemp.SaveAs filename:=sTemp, FileFormat:=xlExcel8, _ Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _ CreateBackup:=False If I remove the parameters after FileFormat it fails. I thought these were optional? Cheers -- Regards, Nigel "Bob Phillips" wrote in message ... Maybe try wbTemp.SaveAs Filename:="D:\Test", FileFormat:=xlExcel9795 -- __________________________________ HTH Bob "Nigel" wrote in message ... Hi All Curious issue has arisen with xl2007 (SP1); I am creating a new workbook based on a template file (xlt) that was created using xl2003 (SP3). The new workbook is created and assigned to a workbook object wbTemp.Which I then wish to save in xl2003 format. I tried without success both of the following.... wbTemp.SaveAs Filename:="D:\Test.xls", FileFormat:=xlExcel9795 wbTemp.SaveAs "D:\Test.xls", xlExcel9795 When run it I get Run-time error 1004 - Method of 'SaveAs' of object '_Workbook' failed What is wrong? PS if I remove the FileFormat parameter it works but of course the format reverts to xl2007 with an xls extension! -- Regards, Nigel |
All times are GMT +1. The time now is 12:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com