Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Save File with multiple cells values as it's name

Is there a way to make a SaveAs macro that saves with a name this is based
in two cells. The example below only can save with the value of cell A1,
what i like to do is save the document with the name of the cell in F4 and
F3. If F4 has a name and F3 has a date then the file saved should look like
"JDoe_12-01-03".

Sub SaveFileAsA1()
ThisFile = Format(Range("A1").Value)
ActiveWorkbook.SaveAs FileName:=ThisFile
End Sub

Thanks you for you help


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Save File with multiple cells values as it's name

One way:

Sub SaveFileAsF4AndF3()
ActiveWorkbook.SaveAs Filename:= _
Range("F4").Value & Format(Range("F3").Value, "_mm-dd-yy")
End Sub

Your example's date was ambiguous, so you may need to use

"_dd-mm-yy"

instead.
In article
,
"Kevin" ! wrote:

Is there a way to make a SaveAs macro that saves with a name this is based
in two cells. The example below only can save with the value of cell A1,
what i like to do is save the document with the name of the cell in F4 and
F3. If F4 has a name and F3 has a date then the file saved should look like
"JDoe_12-01-03".

Sub SaveFileAsA1()
ThisFile = Format(Range("A1").Value)
ActiveWorkbook.SaveAs FileName:=ThisFile
End Sub

Thanks you for you help


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Save File with multiple cells values as it's name

Thank you very much,
I did try many variation of this code but did not have the correct syntax
and order of commands
Kevin
"J.E. McGimpsey" wrote in message
...
One way:

Sub SaveFileAsF4AndF3()
ActiveWorkbook.SaveAs Filename:= _
Range("F4").Value & Format(Range("F3").Value, "_mm-dd-yy")
End Sub

Your example's date was ambiguous, so you may need to use

"_dd-mm-yy"

instead.
In article
,
"Kevin" ! wrote:

Is there a way to make a SaveAs macro that saves with a name this is

based
in two cells. The example below only can save with the value of cell A1,
what i like to do is save the document with the name of the cell in F4

and
F3. If F4 has a name and F3 has a date then the file saved should look

like
"JDoe_12-01-03".

Sub SaveFileAsA1()
ThisFile = Format(Range("A1").Value)
ActiveWorkbook.SaveAs FileName:=ThisFile
End Sub

Thanks you for you help




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
find values in multiple cells and paste row values izzyt1972 Excel Discussion (Misc queries) 5 December 26th 07 10:14 PM
can I save a file of multiple names to replace using excell 03 Greg is working hard. Excel Discussion (Misc queries) 2 July 18th 06 01:39 PM
How do I save an excel file with values instead of formulas? Beginner Excel User Excel Worksheet Functions 1 March 21st 06 09:13 PM
Save As - Multiple Sheets fails to save as text file Ravee Srinivasan Excel Programming 2 November 10th 03 04:05 PM
Macro to insert values from a file and save another sheet as a .txt file Frank[_16_] Excel Programming 2 August 28th 03 01:07 AM


All times are GMT +1. The time now is 02:39 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"