Backup on File Close Excel VBA
问题 I want Excel to automatically backup a workbook on file close without prompts to the user. I found the excellent code below online (forgot source) but the backup FileType is changing to a BAK File that I cannot open. How do I fix this problem. Both files will be in the same folder & the backup should have same file name & "-bak" or ".bak". Sub SaveWorkbookBackup() Dim awb As Workbook, BackupFileName As String, i As Integer, OK As Boolean If TypeName(ActiveWorkbook) = "Nothing" Then Exit Sub