Clone your XL document

Pinaceous

Well-known Member
Joined
Jun 11, 2014
Messages
1,113
Office Version
  1. 365
Platform
  1. Windows
Hi All,

Is there a way to clone your document, where if the user is working with your file and they accidently delete it that it can be restored in using its clone?

Thank you,

Pinaceous
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
You mean like make a copy?

Sect the file in Explorer, Ctrl+C, Ctrl+V
 
Upvote 0
Hi,

What I am trying to get at is there a way for the XL document to be in two places at once?
 
Upvote 0
No file can be two places at once.
 
Upvote 0
Thank you for answering my question.

I guess this sounds like quantum theory for the cpu?
 
Upvote 0
Could you set a macro to autosave the file (to a "Safe" directory) every time that the file is opened and overwriting any existing instance of the file - it would have to be saved under a modified of course?
 
Upvote 0
Further to the above, check this snippet of code:

Code:
Dim year As String
year = InputBox("Enter New Year as a 4 digit number")
Sheets("TitlePage").Unprotect
Range("TitlePage!F50").Value = year
ThisWorkbook.SaveCopyAs "C:\Dir\Fname" & year & ".xlsm"
‘ Workbooks.Open Filename:="C:\Dir\Fname" & year & ".xlsm"

I needed to create a copy of my current work but using the next year in its title. I only needed to use that last row to have an open file to see that other stuff in my macro had worked.

I’ve just run that macro twice and found that I haven’t had to implement any error checks, I suppose because of the “SaveCopyAs” in that second last line.
 
Upvote 0
I've just played a bit further. Add this macro to ThisWorkBook in the VBA Module listing:
Code:
Private Sub Workbook_Open()
ThisWorkbook.SaveCopyAs "C:\Destination\ModifiedName.xlsm"

End Sub

Every time to open your original program then "ModifiedName" will either be created or overwritten.
If some one deleted your original you only need to rename "ModifiedName" and drag it back to its home folder.
 
Upvote 0
You could just put the file on a network share where the users don't have write permission.
 
Upvote 0
Windows has a previous versions function that you may be able to use. The previous versions come from restore points or Windows Backup.
Right click on the file in explorer and select properties
Select the Previous Versions tab any previous version will be listed here.

You could also protect the workbook so that user can not make changes without a password.
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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