Excel 97 to 2003 PROBLEM

  • Thread starter Thread starter JD
  • Start date Start date
J

JD

Greetings,

Can anyone provide me the solution to this problem?

(This is the macro to a picture - all it does is does a SAVE AS)

Sub Save_file()
Filename = Range("Name")
ActiveWorkbook.SaveAs Filename:=([Filename]), FileFormat:= _
xls, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False
_
, CreateBackup:=False
Sheets("Price Increase Data").Select
Range("A1:B1").Select


RESULTS: It errors out in Excel 2003 (created by 97) when doing the Save
As.

You can do the save as macro in Excel 97 but not in 2003.

Thanks.
 
Hi
try replacing the line
Filename = Range("Name")
ActiveWorkbook.SaveAs Filename:=([Filename]), FileFormat:= _
xls, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False
with
Filename = Range("Name")
ActiveWorkbook.SaveAs Filename:=(cstr(Filename.value)),
FileFormat:= _
xls, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False
 
Back
Top