More on Save As Macro

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

Guest

Previous assistance worked but required me to type in the VB code. Is there any way to create the macro using the recorder (not typing in code)?
I need a macro the brings up the Save As box so I can save my workbook with a different name each time I use it. I haven't found a way to stop the recorder while the Save As box is on screen.
 
Hi

Here's a macro that includes this dialog:

Sub Test()
Dim Fname As Variant
Fname = Application.GetSaveAsFilename("", "Workbook (*.xls), *.xls")
If Fname = False Then Exit Sub
ActiveWorkbook.SaveAs CStr(Fname)
End Sub

HTH. Best wishes Harald

wendyh said:
Previous assistance worked but required me to type in the VB code. Is
there any way to create the macro using the recorder (not typing in code)?
I need a macro the brings up the Save As box so I can save my workbook
with a different name each time I use it. I haven't found a way to stop the
recorder while the Save As box is on screen.
 
Don't type it in. Just copy Harald's code from this post and paste it into a
module.

Gord Dibben 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