SAVE AS/ GET SAVE AS/

D

DarrenL

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.
 
G

Gord Dibben

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
 

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

Similar Threads

"save as" 0
Save with ref. to cell A1 2
save as cell A1 to to a specific drive 3
Save As 2
First save to save as 2
File save as 1
Save workbook button on Userform 2
Save-as without stating path 7

Top