'Save As' macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to record a macro that allows me to save the workbook with another file name. I cannot stop the recorder with the 'Save As' window active. My workbook needs to be saved with a different fiename each time I use it for customer details.
 
Wendy,

If you want to navigate to your folder and manually enter your filename:

Sub WendySaver()
ActiveWorkbook.SaveAs Application.GetSaveAsFilename
End Sub

Otherwise, you could automatically create a file name (such as from the
value of a certain cell with a date appended), but you would need to post
your requirements first to make that a worthwhile exercise.

HTH,
Bernie
MS Excel MVP

wendyh said:
I need to record a macro that allows me to save the workbook with another
file name. I cannot stop the recorder with the 'Save As' window active. My
workbook needs to be saved with a different fiename each time I use it for
customer details.
 
--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wendyh said:
I need to record a macro that allows me to save the workbook with another
file name. I cannot stop the recorder with the 'Save As' window active. My
workbook needs to be saved with a different fiename each time I use it for
customer details.
 
Add an input box, something like

Sub Macro1
Dim sFile

sFile = InputBox("Supply file name")
If sFile <> "" Tyhen
Activeworkbook.SaveAs Filename:=sFile
End If

End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

wendyh said:
I need to record a macro that allows me to save the workbook with another
file name. I cannot stop the recorder with the 'Save As' window active. My
workbook needs to be saved with a different fiename each time I use it for
customer details.
 

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