Save As

D

Dave

Hi,
XL2003
I am trying to do a SaveAs according to inputs entered by the op.
Two questions are asked, answers are Ans1 and Ans2
If I use: ActiveWorkbook.SaveAs Filename:=Ans1 & " " & Ans2
Then the workbook is saved correctly, but to the default location. I want
the op to be able to choose the location, but for the constructed filename to
be already present in the SaveAs dialogue box.
I tried: Application.GetSaveAsFilename (Ans1 & " " & Ans2)
which looked promising, allowing me to select the destination. But after
clicking Save, although the SaveAs dialogue box closed and the macro resumed,
the workbook was not actually saved.
Is there a syntax that will do what I want?
Thanks in advance.
Regards - Dave.
 
J

JLGWhiz

Dave, I believe that when you call the SaveAs dialog box with VBA that it
only allows you to return a path and filename. It doesn't do anything with
it. So, you need to add a line of code that executes after you click OK save
the ActiveWorkbook.
 

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


Top