Save file as text from cell

J

jweasl

I have a company name in one cell, when I click save I would like the company
name pasted in the name box.
Thanks
 
G

Gary''s Student

This is just an example. This little macro will SaveAs to the contents of A1.

Put c:\whatever.xls in cell A1 and run the macro.

Sub savetocell()
Dim s As String
s = Cells(1, 1)
ActiveWorkbook.SaveAs Filename:= _
s, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False
End Sub
 
Top