Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
I have transfered from Office 2005 to 2007 Excel Macros which have now
stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting the infamous "Error 1004." The whole line is highligted, which leads me to believe that the start of the line is the problem. I include the line as in Macro, with the exception that the "My Documents" on to the underscore would be on one line: ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My Documents\transfer\ftproot\aartfile.xls", _ FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Any help will be deeply appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
Check out this page Frank
http://www.rondebruin.nl/saveas.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "franks" wrote in message ... I have transfered from Office 2005 to 2007 Excel Macros which have now stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting the infamous "Error 1004." The whole line is highligted, which leads me to believe that the start of the line is the problem. I include the line as in Macro, with the exception that the "My Documents" on to the underscore would be on one line: ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My Documents\transfer\ftproot\aartfile.xls", _ FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Any help will be deeply appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
Excel 2007 does not support this format: FileFormat:=xlExcel9795. You
should use: xlWorkbookNormal (.xls) or xlWorkbookDefault (.xlsx) or xlOpenXMLWorkbookMacroEnabled (.xlsm). -- Jim "franks" wrote in message ... |I have transfered from Office 2005 to 2007 Excel Macros which have now | stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting | the infamous "Error 1004." The whole line is highligted, which leads me to | believe that the start of the line is the problem. I include the line as in | Macro, with the exception that the "My Documents" on to the underscore would | be on one line: | | ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My | Documents\transfer\ftproot\aartfile.xls", _ | FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ | ReadOnlyRecommended:=False, CreateBackup:=False | | Any help will be deeply appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
On Aug 6, 12:53 pm, "Jim Rech" wrote:
Excel 2007 does not support this format: FileFormat:=xlExcel9795. You should use: xlWorkbookNormal (.xls) or xlWorkbookDefault (.xlsx) or xlOpenXMLWorkbookMacroEnabled (.xlsm). -- Jim"franks" wrote in message ... |I have transfered from Office 2005 to 2007 Excel Macros which have now | stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting | the infamous "Error 1004." The whole line is highligted, which leads me to | believe that the start of the line is the problem. I include the line as in | Macro, with the exception that the "My Documents" on to the underscore would | be on one line: | | ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My | Documents\transfer\ftproot\aartfile.xls", _ | FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ | ReadOnlyRecommended:=False, CreateBackup:=False | | Any help will be deeply appreciated. Is there any way to do the equivalent of #ifdef (a preprocessor directive) in VBA to check to see if xlExcel8 (56) is defined? I don't like having to hack all the constants if I can set at the top of my sub or in a public module the check for application version and define xlExcel8 (if it doesn't already exist) as xlWorkbookNormal. Then, for backwards compatibility, I only have to use xlExcel8. Any thoughts would be greatly appreciated. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
Ok. Thanks for the help. fs "Jim Rech" wrote: Excel 2007 does not support this format: FileFormat:=xlExcel9795. You should use: xlWorkbookNormal (.xls) or xlWorkbookDefault (.xlsx) or xlOpenXMLWorkbookMacroEnabled (.xlsm). -- Jim "franks" wrote in message ... |I have transfered from Office 2005 to 2007 Excel Macros which have now | stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting | the infamous "Error 1004." The whole line is highligted, which leads me to | believe that the start of the line is the problem. I include the line as in | Macro, with the exception that the "My Documents" on to the underscore would | be on one line: | | ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My | Documents\transfer\ftproot\aartfile.xls", _ | FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ | ReadOnlyRecommended:=False, CreateBackup:=False | | Any help will be deeply appreciated. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
Thanks, Ron. I will check it out! fs "Ron de Bruin" wrote: Check out this page Frank http://www.rondebruin.nl/saveas.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "franks" wrote in message ... I have transfered from Office 2005 to 2007 Excel Macros which have now stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting the infamous "Error 1004." The whole line is highligted, which leads me to believe that the start of the line is the problem. I include the line as in Macro, with the exception that the "My Documents" on to the underscore would be on one line: ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My Documents\transfer\ftproot\aartfile.xls", _ FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Any help will be deeply appreciated. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveWorkbook.SaveAs
It works on my Macro. I substituted your suggestion (8 instead of 56), into
the line, ".....FileFormat:=xlExcel8, xxxxxx." It at least allows me to keep the code mostly the same! Thanks! fs " wrote: On Aug 6, 12:53 pm, "Jim Rech" wrote: Excel 2007 does not support this format: FileFormat:=xlExcel9795. You should use: xlWorkbookNormal (.xls) or xlWorkbookDefault (.xlsx) or xlOpenXMLWorkbookMacroEnabled (.xlsm). -- Jim"franks" wrote in message ... |I have transfered from Office 2005 to 2007 Excel Macros which have now | stopped working on the "ActiveWorkbook.SaveAs" line. I have started getting | the infamous "Error 1004." The whole line is highligted, which leads me to | believe that the start of the line is the problem. I include the line as in | Macro, with the exception that the "My Documents" on to the underscore would | be on one line: | | ActiveWorkbook.SaveAs Filename:="C:\Documents and Settings\Frank\My | Documents\transfer\ftproot\aartfile.xls", _ | FileFormat:=xlExcel9795, Password:="", WriteResPassword:="", _ | ReadOnlyRecommended:=False, CreateBackup:=False | | Any help will be deeply appreciated. Is there any way to do the equivalent of #ifdef (a preprocessor directive) in VBA to check to see if xlExcel8 (56) is defined? I don't like having to hack all the constants if I can set at the top of my sub or in a public module the check for application version and define xlExcel8 (if it doesn't already exist) as xlWorkbookNormal. Then, for backwards compatibility, I only have to use xlExcel8. Any thoughts would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
ActiveWorkbook.SaveAs Returns | Excel Programming | |||
ActiveWorkbook.SaveAs problem | Excel Programming | |||
'ActiveWorkbook.SaveAs Filename' | Excel Programming | |||
ActiveWorkbook.SaveAs Problem | Excel Programming | |||
activeworkbook.saveas | Excel Programming |