Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Save file with new name(Save As)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Save file with new name(Save As)

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Save file with new name(Save As)

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
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
SAVE and SAVE AS options disappeared from the drop down FILE menu [email protected] Excel Discussion (Misc queries) 2 July 12th 07 09:14 AM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM
Save File to Another Directory, but not change Users File Save location Mike Knight Excel Programming 1 May 28th 04 09:06 PM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM


All times are GMT +1. The time now is 12:19 AM.

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

About Us

"It's about Microsoft Excel"