Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default "Save As" cell reference in a macro

I am looking for a way to create a macro that would save
a file according to a cell reference. This could include
a cell within a worksheet, or the Title field in the
Properties menu. Any information would be extremely
helpful.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default "Save As" cell reference in a macro

Hi
try the following 8using cell A1 from sheet 1)
sub save_it()
dim wks as worksheet
dim fname
Dim path

set wks = worksheets("sheet1")
path = "C:\Temp\"
fname=CStr(wks.Range("A1").value)

ActiveWorkbook.SaveAs Filename:=path & fName
end sub


--
Regards
Frank Kabel
Frankfurt, Germany


jreiv wrote:
I am looking for a way to create a macro that would save
a file according to a cell reference. This could include
a cell within a worksheet, or the Title field in the
Properties menu. Any information would be extremely
helpful.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default "Save As" cell reference in a macro

Hey....You,

See my reply to Mike D above. It sound like an evolution
similar to the example I gave him. You can apply
Cell.Value to retrieve cell contents or populate a
variable.

Matthew

=}


-----Original Message-----
I am looking for a way to create a macro that would save
a file according to a cell reference. This could

include
a cell within a worksheet, or the Title field in the
Properties menu. Any information would be extremely
helpful.
.

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
a Macro to "save as" filename from a cell on the sheet and then pr gugertmk Excel Discussion (Misc queries) 0 March 31st 09 12:32 AM
Macro to Insert Current Date into cell - Macro to "Save As" Guy[_2_] Excel Worksheet Functions 4 December 12th 08 08:20 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"CELL("FILENAME") NOT UPDATE AFTER "SAVE AS" ACTION yossie6 Excel Discussion (Misc queries) 1 June 16th 08 12:16 PM
"Save" and "Save As" options greyed out - "Save as Webpage" option Bill Excel Discussion (Misc queries) 0 January 16th 07 04:47 PM


All times are GMT +1. The time now is 01:37 AM.

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"