SaveAs - modify code?

S

Steve

Hi everyone. What I'm trying to accomplish is to have the user click
a button and have the SaveAs box come up with a default folder
location. The code below does that fine. But, the file is always
saved as the default name (Book1), even if I change it to something
else. Can you please modify the code so I can choose he the file name
to be saved as? Thanks!!

sStr = "L:\Sales\East\Terms\2008\"
ChDrive sStr
ChDir sStr
Application.GetSaveAsFilename
ActiveWorkbook.SaveAs
 
J

Joel

sStr = "L:\Sales\East\Terms\2008\"
ChDrive sStr
ChDir sStr
FName = Application.GetSaveAsFilename
if FName = False then
ActiveWorkbook.SaveAs
else
ActiveWorkbook.SaveAs filename:=FName
end if
 

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

Top