Save options

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a file that I want it to save each time with the following format upon
closing. It should have the network login name, date (short), time (short),
"new agent request".

network name date time "New Agent Request"

I also want it to save to the desktop each time.

I am using excel 2007

Any help would great....thanks!
 
Is this what you're looking for? You might wanna assign this to a button,
and I'd tweak the formatting a little, but here it is:

Sub SaveThis()
Dim FName As String
FName = "C:\Desktop\" & Application.UserName & " " & Format(Now, "m-d-yy
h-mm") & " New Agent Request.xls"
ThisWorkbook.SaveCopyAs (FName)
End Sub
 
This comes back with a Compile Error "Syntax Error" and highlights this test
in red: FName = "C:\Desktop\" & Application.UserName & " " & Format(Now,
"m-d-yy
h-mm") & " New Agent Request.xls"
 
Sub SaveThis()
Dim FName As String
FName = Application.UserName & " " & Format(Now, "m-d-yy hh-mm") & " New
Agent Request.xls"

ActiveWorkbook.SaveCopyAs (FName)
End Sub

wil save the file in you default file location normally my docs
 

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

Back
Top