In this tutorial you will learn how to save workbook with timestamp in its name using VBA macro programming in Microsoft Excel
VBA Code:
'This code will Save the File With a Timestamp in its name
Sub SaveIt()
Dim DateTimeSuffix As String, WorkBookName As String
WorkBookName = "d:\Data_"
DateTimeSuffix = Format(CStr(Now), "yyyy-mm-dd-hh-mm-ss")
ActiveWorkbook.SaveAs Filename:=WorkBookName & DateTimeSuffix
End Sub
Негізгі бет How to save workbook with timestamp in its name using VBA in Excel
Пікірлер: 29