"Save As" cell reference in a macro

J

jreiv

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

Frank Kabel

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
 
M

Matthew =}

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

=}
 
Top