ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Save As" cell reference in a macro (https://www.excelbanter.com/excel-programming/295326-save-cell-reference-macro.html)

jreiv

"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.

Frank Kabel

"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.


Matthew =}[_2_]

"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.
.



All times are GMT +1. The time now is 07:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com