ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   SAVE AS/ GET SAVE AS/ (https://www.excelbanter.com/excel-programming/427041-save-get-save.html)

DarrenL

SAVE AS/ GET SAVE AS/
 
I am trying to attach a macro that will save the workbook automatically as
whatever the user inputs in a particular cell. I need to be able to save it
to a particular place as well. I do not want the "save as" box to pop up.
When they hit the macro button, it should save it as (for example) cell "A1"
in that workbook in "C:\Darren\stuff\"A1". Any help would be appreciated.
Spent alot of time on this one already.

Gord Dibben

SAVE AS/ GET SAVE AS/
 
Will the name always be unique? Or would you want to overwrite existing
file with the same name?

Sub save_as_cell()
Application.DisplayAlerts = False 'remove if want warning
ActiveWorkbook.SaveAs Filename:="C:\Darren\stuff\" & _
Sheets("Sheet1").Range("A1") & ".xls"
Application.DisplayAlerts = True 'remove if want warning
End Sub


Gord Dibben MS Excel MVP

On Thu, 16 Apr 2009 15:04:09 -0700, DarrenL
wrote:

I am trying to attach a macro that will save the workbook automatically as
whatever the user inputs in a particular cell. I need to be able to save it
to a particular place as well. I do not want the "save as" box to pop up.
When they hit the macro button, it should save it as (for example) cell "A1"
in that workbook in "C:\Darren\stuff\"A1". Any help would be appreciated.
Spent alot of time on this one already.




All times are GMT +1. The time now is 09:39 PM.

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