感谢您对此进行调查。
我试图通过VBA备份打开的工作簿,然后在创建备份文件后,宏应按顺序执行其他任务。 非常感谢!
我希望将工具备份到当前保存的目录中,并继续使用旧版本
Sub Refresh_Tool()
Call Un_P_All
If MsgBox("THIS ACTION WILL DELETE ALL OLD LEAVES DATA, HOLIDAYS CALENDAR AND ALSO CARRY FORWARD LEAVES FROM LAST YEAR. ARE YOU SURE YOU WANT TO CONTINUE?", vbYesNo, "CRITICAL ACTION!!!") = vbYes Then
Call backup_file_first ' i want this to create exact replica of this workbook and keep working on next procedures in line
Call delete_last_year_data
Call Carry_Forward_Leaves
ThisWorkbook.Save
Call Add_New_Year_Holiday_Calendar
End If
Call P_All
End Sub