View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lynn Lynn is offline
external usenet poster
 
Posts: 131
Default Saving the Active Workbook

I need some help saving files during a macro:

1) I want to specify a path & file name for the active file to be saved
with - no user intervention required. The following code works for the file
name but location seems random - how do I specify where the file should be
saved?

ActiveWorkbook.SaveAs Filename:="my new file.xls"

2) I want to end my macro by having the user save the active workbook with
location and file name of their choice. I have used the following code to
display the SaveAs dialog but when the user clicks Save, the file is not
actually saved. What extra code is needed to execute the Save using location
& file name from the SaveAs dialog?

Application.FileDialog(msoFileDialogSaveAs).Show