Save As ?

maw230

somewhat competent
Local time
Today, 15:12
Joined
Dec 9, 2009
Messages
522
i just need to tell my macro to save my file as a different name each time it is run.

Workbooks.Add
ActiveWorkbook.SaveAs Filename:="G:\Mark\Report Results\MTD\Book8.xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False

instead of Book8 it just needs to be dynamic i dont care what its called. for some reason when i add the new workbook i have to save it before i can paste into it otherwise i wouldnt even need to save it at this point in the macro, but since i have to save it i need the name to change each time. thanks.
 
ActiveWorkbook.SaveAs Filename:="G:\Mark\Report Results\MTD\Book" & format(now(),"yyyymmddhhnnss") & ".xlsx", _
 
thanks works great. although i think using seconds may have been a tad much for my application :D
 

Users who are viewing this thread

Back
Top Bottom