I want to create at map called a date ex. 02-09-2015
then save the xlsm file and then also save it as a xlsx file.
I want the file name of the xlsx as "Test 02092015 a", where 02092015 i calculated date format(date - 1, "DDMMMYYY")
Sub gem()Dim path As String
FolderName = Format(Date - 2, "DD-MM-YYYY")
path = "C:\Users\olr\Desktop\" & FolderName
If Len(Dir(path, vbDirectory)) = 0 Then
MkDir (path)
End If
ActiveWorkbook.Save
ActiveWorkbook.SaveAs Filename = ("path\" & Test & Format(Date - 2, "DDMMYYYY") a.xlsx), xlWorkbook = 51
ActiveWorkbook.Close
End Sub
then save the xlsm file and then also save it as a xlsx file.
I want the file name of the xlsx as "Test 02092015 a", where 02092015 i calculated date format(date - 1, "DDMMMYYY")
Sub gem()Dim path As String
FolderName = Format(Date - 2, "DD-MM-YYYY")
path = "C:\Users\olr\Desktop\" & FolderName
If Len(Dir(path, vbDirectory)) = 0 Then
MkDir (path)
End If
ActiveWorkbook.Save
ActiveWorkbook.SaveAs Filename = ("path\" & Test & Format(Date - 2, "DDMMYYYY") a.xlsx), xlWorkbook = 51
ActiveWorkbook.Close
End Sub