Cell To Be Filename

J

JMay

Sample: In J2 Sheet1 >>> "Testaroonie" (without quotes)
In a standard module put:

Sub testme()
Application.Dialogs(xlDialogSaveAs).Show _
Worksheets("sheet1").Range("j2").Value & ".xls"
End Sub

HTH
 
B

Bob Phillips

ActiveWorkbook.SaveAs Filename:=Range("B5") & ".xls"

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

markstro

Dan_Crew said:
Anyway that say that the contents of cell B5
When saved become the filename

In any cell you choose:
=+cell("filename")
path for that file will show and be save when you save.
 
B

Bob Phillips

You've answered another question , and the + is unnecessary, and you should
anchor the function to the sheet with a cell reference

=CELL("filename",A1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

mudraker

Willis

try


FileName = "DayReport" & day(now()) & ".xls"

ActiveWorkbook.SaveAs "c:\termp\" & FileNam
 
Top