Microsoft Excel Tips

Microsoft Excel Tips

Share

The aim of Excel Tips is to make beginners become productive and awesome in Excel. You have to learn excel very well. Post more doubts and suggestions.

Photos from Microsoft Excel Tips's post 09/11/2020

Excel Backup while saving the file - MACRO VBA CODE BELOW:

Step 1 : Open Your excel file.
Step 2 : Do the Save as the file - Choose Save type - Macro enables work Book. ( See the first Picture )

Step 3 : Press Alt+F11 (Press the Key button together )
Step 4 : Double Click on “This Work book”
Step 5 : Select “Work Book” (Left side ) and Select “Before Save” (Right Side)
Step 6 : Delete the Data ( Press Ctrl + A and Press Delete Button)
Step 7 : Paste the VBA Code Below;

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Call Save_Backup("")
End Sub
Sub Save_Backup(ByVal Backup_Folder_Path As String)
Dim fso As Object
Dim ExtensionName As String, FileName As String
Dim wbSource As Workbook
Set fso = CreateObject("Scripting.FileSystemObject")
Set wbSource = ThisWorkbook
ExtensionName = fso.GetExtensionName(wbSource.Name)
FileName = Replace(wbSource.Name, "." & ExtensionName, "")
fso.CopyFile ThisWorkbook.FullName, _
fso.BuildPath(Backup_Folder_Path, FileName & " (" & Format(Now(), "mm-dd-yy hhmmssAM/PM") & ")." & ExtensionName)
Set fso = Nothing
Set wbSource = Nothing
End Sub

Step 8 : Copy the Backup folder address
Step 9 : Select the text inside VBA Code and past the address.

Step 10 : Save the file.

Now whenever you save , back files will be generated.
You can check the files on the backup folder.

Want your school to be the top-listed School/college in Tirur?
Click here to claim your Sponsored Listing.

Category

Telephone

Website

Address

Cheeniyath House
Tirur
676108