"SaveWorkbookBackup” macro will create a backup of the Excel file with the “.bak” extension within the same folder where the active workbook is saved.
“SaveWorkbookBackupToFloppy” macro will create a copy of the active workbook in drive D which will act as a backup file for the active workbook.
Code explanation
If Not Ok Then
MsgBox "Backup Copy Not Saved!", vbExclamation, ThisWorkbook.Name
End If
The above code is used for displaying an error message when some runtime error occurs during the execution of the macro.
If AWB.Path = "" Then
'Displaying Save as dialog box for file saving
Application.Dialogs(xlDialogSaveAs).Show
The above code is used for displaying Save As dialog box if the file is not saved before taking the backup of the file.
You can check more about VBA on
https://www.apps4rent.com
Let me know if this helps.
Regards,
Jerry