Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was looking for some code that will take the current file name and use
'Save As' to name it with the current path: G:\COMMAND-CENTER\Accounts\account name\name PMR\***the new file name as 'name PMR mm/dd/yyyy' This name will need to reflect the previous day's date. Any help would be appreciated! Thanks -- EW - Analyst |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi ewagz
Try this Dim wb As Workbook Dim strdate As String strdate = Format(Date, "mm-dd-yyyy") Set wb = ActiveWorkbook With wb .SaveAs "G:\COMMAND-CENTER\Accounts\account name\name PMR " & strdate & ".xls" .Close False End With -- Regards Ron de Bruin http://www.rondebruin.nl "ewagz" wrote in message ... I was looking for some code that will take the current file name and use 'Save As' to name it with the current path: G:\COMMAND-CENTER\Accounts\account name\name PMR\***the new file name as 'name PMR mm/dd/yyyy' This name will need to reflect the previous day's date. Any help would be appreciated! Thanks -- EW - Analyst |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Remove this line if you not want to close the file
.Close False -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Hi ewagz Try this Dim wb As Workbook Dim strdate As String strdate = Format(Date, "mm-dd-yyyy") Set wb = ActiveWorkbook With wb .SaveAs "G:\COMMAND-CENTER\Accounts\account name\name PMR " & strdate & ".xls" .Close False End With -- Regards Ron de Bruin http://www.rondebruin.nl "ewagz" wrote in message ... I was looking for some code that will take the current file name and use 'Save As' to name it with the current path: G:\COMMAND-CENTER\Accounts\account name\name PMR\***the new file name as 'name PMR mm/dd/yyyy' This name will need to reflect the previous day's date. Any help would be appreciated! Thanks -- EW - Analyst |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
SAVE and SAVE AS options disappeared from the drop down FILE menu | Excel Discussion (Misc queries) | |||
when i save xls file, debug script is running and canno't save fil | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
Save File to Another Directory, but not change Users File Save location | Excel Programming | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |