I have a macro that creates a new workbook, copies some data from the source book, pastes into the newly created book, then saves that new book and closes it. This code works PERFECTLY in Excel 2013, but does not function in Excel 2007. It breaks on the line indicated in my code below with the 1004 error: Method 'SaveAs' of object '_Workbook' failed
The code in question:
![]()
Please Login or Register to view this content.
My guess is that it has to do with the fact that I have a variable file format, but this is required given that the user needs to be able to save as either a CSV or tab delimited text, depending on the application.
Like I said, this code runs perfectly in Excel 2013. Some computers at my place of business however use older versions of office, 2007 being common, and this doesn't want to function on those older versions. Any idea how I might be able to modify this code to enable it to run on older versions of Excel (at least as old as 2007) as well?
Many thanks!
Bookmarks