Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default reading a range name as part of Save-as file

Earlier this month, I was given the code shown below to perform a
Save-as to create a new file name. Upon running this on 12/27/05, the
new name would be Staging List 12-27-05.xls
This worked fine for the file I'm using it in.

ActiveWorkbook.SaveAs _
Filename:="Staging List " & Format(Now, "mm-dd-yy") & ".xls", _
FileFormat:=xlWorkbookNormal


I have a different file that I would like to use this in. But, I want
to alter this code so that instead of using the default date based on
the computer clock, I would like it to read the named range
"Current_Date".

I've been playing around with this for awhile. I've replaced Now with
"Current_Date" , but that didn't work. Maybe someone here can come up
with the correct coding. Assume the 1st part of the file name as shown
above, Staging List, will remain the same.... I'll change that to the
actual beginning of the file name when I enter the coding.

Thanks,
J.O.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default reading a range name as part of Save-as file

ActiveWorkbook.SaveAs _
Filename:="Staging List " & Format(Range("Current_Date").Value,
"mm-dd-yy") & ".xls", _
FileFormat:=xlWorkbookNormal

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"excelnut1954" wrote in message
oups.com...
Earlier this month, I was given the code shown below to perform a
Save-as to create a new file name. Upon running this on 12/27/05, the
new name would be Staging List 12-27-05.xls
This worked fine for the file I'm using it in.

ActiveWorkbook.SaveAs _
Filename:="Staging List " & Format(Now, "mm-dd-yy") & ".xls", _
FileFormat:=xlWorkbookNormal


I have a different file that I would like to use this in. But, I want
to alter this code so that instead of using the default date based on
the computer clock, I would like it to read the named range
"Current_Date".

I've been playing around with this for awhile. I've replaced Now with
"Current_Date" , but that didn't work. Maybe someone here can come up
with the correct coding. Assume the 1st part of the file name as shown
above, Staging List, will remain the same.... I'll change that to the
actual beginning of the file name when I enter the coding.

Thanks,
J.O.



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
How do I save part of a worksheet in a separate file? cleo Excel Worksheet Functions 3 May 15th 07 01:26 AM
Save a Range on a Workbook as a CSV File Connie Excel Discussion (Misc queries) 2 October 20th 06 03:42 PM
File Save As -Selected Range Sprint54 Excel Discussion (Misc queries) 1 February 8th 06 02:28 AM
reading a range name as part of Save-as file excelnut1954 Excel Programming 1 December 27th 05 05:38 PM
Save a range to binary file (including its format) Cool Sport Excel Programming 1 January 7th 05 01:12 PM


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

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"