Saving file to a differant name

G

Garry

In Excel 2003, I have a spreadsheet which i fill in for differant
items. I then save a copy with the item number which is in Cell C:3.

Is there a way to automate this process, Ie to-do a save as with the
contents of cell C:3, from a button click of the toolbar.


Thanks
Garry
 
G

Gord Dibben

Assign this macro to button on your Toolbar.

Sub New_Name()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
With ActiveWorkbook
.SaveAs Filename:=ActiveWorkbook.Path _
& "\" & ActiveSheet.Range("C3").Value & ".xls"

'If file has never been saved it will have no path
'you must supply a path with this code instead of above

' .SaveAs Filename:="C:\Gordstuff" _
' & "\" & ActiveSheet.Range("C3").Value & ".xls"

End With
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub


Gord
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top