![]() NewFileName = Mid ( oldFileName, 1, InStrRev ( oldFileName, "." ) - 1 ) & timeStamp & ".csv" TimeStamp = Format ( Now, "yyyymmddhhmmss" ) However, if FileFormat is set toĦ (.csv) the code will throw the error above. ![]() Run-time error '1004':Method 'SaveAs' of object '_Workbook' failedĥ3 (.xlsm) the code will successfully finish. The code works up until the ActiveWorkbook.SaveAs Filename:=newFileName, FileFormat:=6, CreateBackup:=False line, which then throws the error: Neither of the solutions worked for me (one solution was changing the FileFormat parameter toĦ from xlCSV and the other was to replace / in a file path with "method saveas of object _workbook failed" error while trying to save an XLSM as CSV) and here ( ), While a similar issue was documented here ( Getting The code is supposed to allow the user to click a button, which will then export an active worksheet to a CSV file. ![]() The issue appears specific to Excel 2016 for Mac when ![]() 15.25) The macro works on Windows platforms with Excel 2016, and on Mac platforms with earlier than the 2016 version. ![]() I am trying to run a VBA macro in Excel 2016 for Mac (v. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |