Harshil Mehta
Board Regular
- Joined
- May 14, 2020
- Messages
- 85
- Office Version
- 2013
- Platform
- Windows
I want to make a save as with file name as, time stamp(space)text in range M2(space)Design Format
example: 20200525 1747 Client Design Format
Range M2 = Client
Sub Make_saveas()
Worksheets(Array("Sheet1", "Sheet2")).Copy
With ActiveWorkbook
.SaveAs Filename:=Environ("USERPROFILE") & "\Desktop\" & Format(Now(), "YYYYMMDD HHMM, sheets(3).range("M2"), "Design Format"")& ".xlsx", FileFormat:=xlOpenXMLWorkbook
.Close SaveChanges:=False
End With
End Sub
Please help me with the above code.
example: 20200525 1747 Client Design Format
Range M2 = Client
Sub Make_saveas()
Worksheets(Array("Sheet1", "Sheet2")).Copy
With ActiveWorkbook
.SaveAs Filename:=Environ("USERPROFILE") & "\Desktop\" & Format(Now(), "YYYYMMDD HHMM, sheets(3).range("M2"), "Design Format"")& ".xlsx", FileFormat:=xlOpenXMLWorkbook
.Close SaveChanges:=False
End With
End Sub
Please help me with the above code.