In the two-click project tree in Stables. Then at the top of the combobox from the left select Workbook, it is to be expected that automatically appears this:
Private Sub Workbook_Open()
End Sub
If this does not appear, just select on combobox right to function Open. And add the function as described below.
Private Sub Workbook_Open()
planilha_backup
End Sub
Create a new module and insert this function
Option Explicit
Option Private Module
Function planilha_backup()
Dim str_nome_da_pasta_de_trabalho As String
Dim str_caminho_da_pasta_de_trabalho As String
Dim str_data_hora As String
Dim diretorio As String
str_data_hora = Replace(Date, "/", "-") & "_" & Hour(Now) & Minute(Now) & Second(Now) & "_"
str_nome_da_pasta_de_trabalho = ActiveWorkbook.Name
str_caminho_da_pasta_de_trabalho = ActiveWorkbook.Path
diretorio = str_caminho_da_pasta_de_trabalho & "\" & "bkp_" & str_data_hora & str_nome_da_pasta_de_trabalho
ActiveWorkbook.SaveAs Filename:= _
diretorio, FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
str_nome_da_pasta_de_trabalho = ""
str_caminho_da_pasta_de_trabalho = ""
str_data_hora = ""
diretorio = ""
End Function