


The controls to configure the Auto-Recover feature are in the Save settings in Excel Options. More Information How to configure the Auto-Recover settings Microsoft Office Excel 2007 and Excel 2010 This article contains an overview of the Auto-Recover feature. The files can be recovered if Excel closes unexpectedly, for example, during a power failure. The Auto-Recover feature saves copies of all open Excel files at a user-definable fixed interval. XlWorkbookDefault is also listed with a value of 51, which puzzles me since I thought the default format could be changed.Microsoft Excel now has a built-in Auto-Recover feature that has replaced the Auto-Save add-in that exists in versions of Excel that are earlier than Microsoft Excel 2002. XlOpenXMLWorkbookMacroEnabled = 52 is the. To be honest, I don't recognize a lot o the descripions. See this msdn page for a list of file formats. I suggest adding the extension and the matching format. That makes sense-not having to supply an extension from the GUI interface is convenient, but we programmers are expected to write unambiguous code. Maybe you need to supply one when doing this programmatically. SaveAs "C:\someDirector\Awesome.xlsm", fileformat:=xlOpenXMLWorkbookMacroEnabled You should specify the file format along with the filename, making sure the format matches the extension: With someWorkbook It could be that your default format doesn't match the file extension. you need to make a save file before this script will work, because a new workbook is saved to the default autosave location! 01-01-2016 -> assign the sub to a button and run. MsgBox "Chose a date for the event", vbOKOnlyĬopy the code into a new module and then write a date in cell "A1" e.g. I wrote the code below which allows you to save a workbook using the path where the file was originally located, naming it as "Event " Option ExplicitĪ Filename:=path & "\" & fname, _įileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False Stop recording and you can start inspecting your code. Once you start recording, save the file to the location you want, with the name you want, and then of course set the file type, most likely 'Excel Macro Enabled Workbook' ~ 'XLSM' Easiest way to use this function is to start by 'Recording a Macro'.
