LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default How do I convert a macro that was created in 2003 Excel to 2007

I recently upgraded to Office 2007. Before I ugraded to Office 2007 I was
using a macro that was created in 2003 but I'm not able to use it now. The
macro fails and I get an Runtime error '1004' - Method 'SaveAs' of
Object'_workbook failed.
I changed the file extension within the macro to Excel 2007 (xlsm), but did
not change this part of the code because I don't know what it should be. See
attached code:

ActiveWorkbook.SaveAs Filename:= _
FOLDER & "OrderStatusTemp.xls", FileFormat:= _
xlExcel9795, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False

Set fs = CreateObject("Scripting.FileSystemObject")
fs.DeleteFile FOLDER & "OrderStatus.xls"
ActiveWorkbook.SaveAs Filename:= _
FOLDER & "OrderStatus.xls", FileFormat:= _
xlExcel9795, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False
fs.DeleteFile FOLDER & "OrderStatusTemp.xls"

Any help you can provide will be helpful.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
running a Macro in 2007 which was created in 2003 Simon Excel Discussion (Misc queries) 8 April 23rd 10 05:31 AM
columns not displaying in excel 2007, created in 2003 pernes Excel Discussion (Misc queries) 2 February 20th 09 05:26 PM
copy 2007 created macro to run in 2003 amaries Excel Discussion (Misc queries) 4 December 18th 08 07:48 PM
2007 Excel Add-in created in version 2003 but not valid add-in for oezkanoezkan Setting up and Configuration of Excel 0 December 12th 08 11:39 AM
2007 Excel Add-in created in version 2003 but not valid add-in for oezkanoezkan Excel Discussion (Misc queries) 0 December 12th 08 11:36 AM


All times are GMT +1. The time now is 01:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"