Vba screenupdating excel 2016 speed dating bethlehem pa
If you run the code in Excel 2007-2016 it will look at the File Format of the parent workbook and save the new file in that format. Cut Copy Mode = False Temp File Path = Application.
Only if the parent workbook is an xlsm file and if there is no VBA code in the new workbook it will save the new file as xlsx. Default File Path & "\" Temp File Name = "Part of " & Sourcewb.
But because there are so many new file formats in Excel 2007-2016, we shouldn't use code like this that does not specify the File Format parameter.
In Excel 2007-2016, Save As requires you to provide both the File Format parameter and the correct file extension.
Below are two basic code examples to copy the Active Sheet to a new Workbook and save it in a format that matches the file extension of the parent workbook. Even though you've got your answer, for those that find this question, it is also possible to open an Excel spreadsheet as a JET data store. Close False Set xl = Nothing End Sub Just to emphasize, you must cleanup after you are done with an invisible instance.