Saving a Backup Copy of a Workbook (E033.xls)

Hello Derek,

I Have been trying to get this to work by using both the code from the book and pasting it in an Excel file and also the file from the download link.
The downloaded Excel file does not have the 'Path' options commented out as is shown in the book, but this is easily fixed.

I have not been able to get either of them to work, and have spent considerable time trying, so I have decided to just give up with these and keep working with what I am currently using (last two code examples in an earlier message).

Thanks for all the suggestions you have offered, I do appreciate your help.

Regards,
Dave T
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hello All,

I have changed some of the code within ThisWorkbook from the original code:
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
                                Cancel As Boolean)
 If SaveAsUI Then
    ' Only save backup if the workbook is being saved from Excel
    SaveBackup Me
  End If
End Sub

To this and it now works a treat:
Code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
'http://www.mrexcel.com/forum/showthread.php?t=493991
  Application.EnableEvents = False
  Call SaveBackup
  Application.EnableEvents = True
End Sub


Regards,
Dave T
 

Forum statistics

Threads
1,224,518
Messages
6,179,253
Members
452,900
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top