![]() |
Save options
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! |
Save options
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 ------ Cheers, Anony "wagz" wrote: 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! |
Save options
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" "Anony" wrote: 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 ------ Cheers, Anony "wagz" wrote: 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! |
Save options
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 "wagz" wrote: 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" "Anony" wrote: 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 ------ Cheers, Anony "wagz" wrote: 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! |
All times are GMT +1. The time now is 09:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com