Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Save file with todays date ref#11235

Hello,

I need to save an excel file to the below directory with todays date
can anyone assist me in combining the two formulas.


Formulas to save file as todays date

ActiveWorkbook.SaveAs "Report" & Format(Now, "yyyymmdd") & ".xls"



This is the directory

Sub test3()
'
' test3 Macro
' Macro recorded 1/29/2009 by ME
'

'
ActiveWorkbook.SaveAs Filename:= _
"\\Wnccteav4\CCVOL4\MFC\SHARED\GSAM\Macro Database\Currency
Imbalance\Imbalance database\For 01.30.09.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Save file with todays date ref#11235

Option Explicit
Sub test3()
dim myFileName as string
Dim myPath as string

'make sure you include the last backslash!
myPath = "\\Wnccteav4\CCVOL4\MFC\SHARED\GSAM\Macro Database\" _
& "Currency Imbalance\Imbalance database\"

myFilename = "Report" & Format(date, "yyyymmdd") & ".xls"

ActiveWorkbook.SaveAs Filename:=myPath & myfilename, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

End Sub

wrote:

Hello,

I need to save an excel file to the below directory with todays date
can anyone assist me in combining the two formulas.

Formulas to save file as todays date

ActiveWorkbook.SaveAs "Report" & Format(Now, "yyyymmdd") & ".xls"

This is the directory

Sub test3()
'
' test3 Macro
' Macro recorded 1/29/2009 by ME
'

'
ActiveWorkbook.SaveAs Filename:= _
"\\Wnccteav4\CCVOL4\MFC\SHARED\GSAM\Macro Database\Currency
Imbalance\Imbalance database\For 01.30.09.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 269
Default Save file with todays date ref#11235

Construct your file name string first like this

FName="\\Wnccteav4\CCVOL4\MFC\SHARED\GSAM\Macro Database\Currency
Imbalance\Imbalance database\Report" & Format(Now, "yyyymmdd") & ".xls"

Then use it in the Save line

ActiveWorkbook.SaveAs Filename:= _
FName, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False


" wrote:

Hello,

I need to save an excel file to the below directory with todays date
can anyone assist me in combining the two formulas.


Formulas to save file as todays date

ActiveWorkbook.SaveAs "Report" & Format(Now, "yyyymmdd") & ".xls"



This is the directory

Sub test3()
'
' test3 Macro
' Macro recorded 1/29/2009 by ME
'

'
ActiveWorkbook.SaveAs Filename:= _
"\\Wnccteav4\CCVOL4\MFC\SHARED\GSAM\Macro Database\Currency
Imbalance\Imbalance database\For 01.30.09.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering File Info Specifically Save Date or Print Date Gadgetgw Excel Discussion (Misc queries) 4 October 6th 08 08:43 PM
Saveing workbook to a file as todays date daily mikespeck Excel Worksheet Functions 0 August 22nd 06 01:27 PM
Create a button that will date stamp todays date in a cell Tom Meacham Excel Discussion (Misc queries) 3 January 11th 06 01:08 AM
When I open my past invoice it keeps changing date to todays date Stop date changing to todays in Excel Excel Worksheet Functions 2 October 7th 05 04:54 PM
Automatic Populate Todays Date in Cell when File is Saved. Nello Excel Discussion (Misc queries) 3 April 21st 05 11:08 PM


All times are GMT +1. The time now is 02:16 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"