SaveAs Filename Help

R

Ron de Bruin

I'm trying to create a sub rountine that will save the active woorbook with
the current date and time.

Sub test()
ActiveWorkbook.SaveAs Format(Now, "dd-mm-yy h-mm-ss") & ".xls"
End Sub
 
E

Ed

I'm trying to create a sub rountine that will save the active woorbook with
the current date and time.
E2 has the NOW() function. I copied the code from another woorbook and tried
to modify it and now I'm
just lost.
What I want to do is save the routine in a woorbook called FTR.xls, but want
to execute the procedure on different
woorbooks that I open.


Sub Save_File ()
ActiveWorkbook.SaveAs Filename:=Sheets("Sheet5").Range("E2").Value &
".xls"

End Sub

T.I.A.
Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top