#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Save As "cell Value"


I need to record a macro that will save a file (file name) as the value
in a specific cell. Can this be done?


--
bpreas
------------------------------------------------------------------------
bpreas's Profile: http://www.excelforum.com/member.php...o&userid=34705
View this thread: http://www.excelforum.com/showthread...hreadid=573170

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default Save As "cell Value"

I get this code when I record a macro which does what you're describing:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/18/2006 by David Nevin Friedman
'

'
Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")
Range("E10").Select
ActiveCell.FormulaR1C1 = "save this file as the value in this cell"
ChDir "C:\Documents and Settings\df78700\Desktop"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\df78700\Desktop\save this file as the
value in this cell.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
--
Brevity is the soul of wit.


"bpreas" wrote:


I need to record a macro that will save a file (file name) as the value
in a specific cell. Can this be done?


--
bpreas
------------------------------------------------------------------------
bpreas's Profile: http://www.excelforum.com/member.php...o&userid=34705
View this thread: http://www.excelforum.com/showthread...hreadid=573170


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 644
Default Save As "cell Value"

Dave's solution is a hard coded value. Use this modification:

ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\df78700\Desktop\" _
& Sheets("YourSheet").Range("A1")
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False

Charles

Dave F wrote:
I get this code when I record a macro which does what you're describing:

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/18/2006 by David Nevin Friedman
'

'
Application.Run Range("AUTOSAVE.XLA!mcs02.OnTime")
Range("E10").Select
ActiveCell.FormulaR1C1 = "save this file as the value in this cell"
ChDir "C:\Documents and Settings\df78700\Desktop"
ActiveWorkbook.SaveAs Filename:= _
"C:\Documents and Settings\df78700\Desktop\save this file as the
value in this cell.xls" _
, FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
End Sub
--
Brevity is the soul of wit.


"bpreas" wrote:


I need to record a macro that will save a file (file name) as the value
in a specific cell. Can this be done?


--
bpreas
------------------------------------------------------------------------
bpreas's Profile: http://www.excelforum.com/member.php...o&userid=34705
View this thread: http://www.excelforum.com/showthread...hreadid=573170



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Save As "cell Value"


This solution works perfectly!


--
bpreas
------------------------------------------------------------------------
bpreas's Profile: http://www.excelforum.com/member.php...o&userid=34705
View this thread: http://www.excelforum.com/showthread...hreadid=573170

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
Cannot save excel files to a folder on a network Robbie Excel Discussion (Misc queries) 1 June 9th 06 07:26 AM
macro save a workbook whilst increasing file no shrek Excel Worksheet Functions 0 November 10th 05 02:40 PM
Save as Msg box monster Excel Discussion (Misc queries) 3 August 31st 05 06:45 PM
Save as Msg box Bob Umlas, Excel MVP Excel Discussion (Misc queries) 0 August 29th 05 09:56 PM
Save & Save As features in file menu of Excel Blue Excel Discussion (Misc queries) 9 December 27th 04 08:49 PM


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