View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Gord Dibben[_2_] Gord Dibben[_2_] is offline
external usenet poster
 
Posts: 621
Default Saving file to a differant name

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

On Sun, 29 Jan 2012 10:51:48 -0800 (PST), Garry
wrote:

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