sathish2009
New Member
- Joined
- Nov 10, 2016
- Messages
- 5
Hi,
My current macro code is
And i would like to execute the vba code automatically on saving the file.
Thanks
My current macro code is
Code:
Sub Autosave()
Dim Wkb As Workbook Dim Wkbnew As Workbook
Dim FilenamePath As String
Set Wkb = ActiveWorkbook
FilenamePath = Wkb.FullName
Wkb.SaveAs ThisWorkbook.Path & ("\MyExcelData - " & Format(Now(), "DD-MMM-YYYY_ hh_mm AMPM") & ".xlsm")
Kill FilenamePath
End Sub
And i would like to execute the vba code automatically on saving the file.
Thanks