ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Saving file to a differant name (https://www.excelbanter.com/new-users-excel/358263-saving-file-differant-name.html)

Garry[_2_]

Saving file to a differant name
 
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

Gord Dibben[_2_]

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



All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com