vba prompt for file name when saving
This code is adapted from the example given in the VBA Help files for the GetSaveAsFilename amd SaveAs methods. I put it inside the Workbook_Open event so that the Save As dialog box opens whenever the workbook is opened.As written, it does not prevent the user from canceling the Save As, so that would have to be added if needed. 1 - Use Alt-F11 to open the VBA editor.2 - Double-click the ThisWorkbook entry under the VBA Project list. 3 - Paste the following code into the pane that opens and save the file.his code is adapted from the example given in the VBA Help files for the GetSaveAsFilename amd SaveAs methods. I put it inside the Workbook_Open event so that the Save As dialog box opens whenever the workbook is opened.