SOLVED

excel

Copper Contributor

Hi I need Sheet Backup and Restore in Excel VBA Please

2 Replies
best response confirmed by RohullahSharifi1020 (Copper Contributor)
Solution

@RohullahSharifi1020 

 

It's simple code and more efficient than that, what more could you need! :))

VBA code should be placed in "This Workbook".

 

 

Option Explicit

Private Sub Workbook_Open()
Backup _
        intHrs:=6, _  'insert the time (in hours) after how many hours it should backup each time  
        strPathIn:="\\NAS3\Team\Own\Filename_Backup_2022\"   'insert the path where the backup should be saved.
End Sub

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

Thanks Nikolino for your information, I want to have everything at my disposal so that I can backup and restore myself.
Thanks again
1 best response

Accepted Solutions
best response confirmed by RohullahSharifi1020 (Copper Contributor)
Solution

@RohullahSharifi1020 

 

It's simple code and more efficient than that, what more could you need! :))

VBA code should be placed in "This Workbook".

 

 

Option Explicit

Private Sub Workbook_Open()
Backup _
        intHrs:=6, _  'insert the time (in hours) after how many hours it should backup each time  
        strPathIn:="\\NAS3\Team\Own\Filename_Backup_2022\"   'insert the path where the backup should be saved.
End Sub

 

 

I would be happy to know if I could help.

 

Nikolino

I know I don't know anything (Socrates)

* Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.

View solution in original post