3 replies
by dr. dale
Create a new macro and insert the following lines of code:
Dim wbname As Variant
Range("A3").Select
wbname = ActiveCell.FormulaR1C1
ActiveWorkbook.SaveAs FileName:=wbname
This will save the current workbook to whatever is in cell A3. I would suggest adding some error checking to this procedure. There are some characters that you could type into this cell that would consitute an invalid filename, and thus cause the macro to fail.
by shanghai sam
I just came back to the site to answer my own question, although my solution was slightly different:
dim wbname as string
wbname=range("A3).Value
ActiveWorkbook.SaveAs Filename:="G:\Billing\" & wbname & ".xls"
End Sub
This discussion is closed to new replies.
Trending Software posts
Sort by Trending