SAVE AS/ GET SAVE AS/

  • Thread starter Thread starter DarrenL
  • Start date Start date
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.
 
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

Back
Top