How to call a filename as per information in a cell when using `save as`

D

Dave

I wish to open a templete and input information then when
I click on the save button it saves it and calls the file
the same name as information in a particular cell. Is this
Poss.
 
F

Frank Kabel

Hi
put the following code in your workbook module

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As _
Boolean)
dim fname
application.enableevents=false
fname=me.worksheets("sheet1").range("A1").value
fname=fname&".xls"
me.savesas fname
application.enableevents=true
Cancel = True
End Sub
 
Top