Macro code to display "Save as" dialog box in three locations


Posted by A.R. on May 03, 2001 1:22 PM

I need a macro code that will display the "Save as" dialog box for a file that is saved in three different locations. For example, the "Save as" dialog box will be displayed for a file to be saved on C drive in a particular folder. Once I verify or change the filename, the macro continues and the "Save as" dialog box come up again for the file to be saved in the G drive in a particular folder. The macro continues for the last location to be saved. Can someone provide the macro code for the above example?

Posted by Dave Hawley on May 03, 2001 2:11 PM


Hi AR

I haven't tested this, but it should work.


Sub ShowSaveAs()
'Written by OzGrid Business Applications
'www.ozgrid.com

For i = 1 To 3
Application.Dialogs(xlDialogSaveAs).Show
Next i

End Sub


Dave
OzGrid Business Applications

Posted by Dave Hawley on May 03, 2001 2:13 PM

Oops, forgot to dimension!

Sub ShowSaveAs()
'Written by OzGrid Business Applications
'www.ozgrid.com
Dim i As Integer
For i = 1 To 3
Application.Dialogs(xlDialogSaveAs).Show
Next i

End Sub

OzGrid Business Applications



Posted by A.R. on May 04, 2001 9:49 AM

Dave: Question

Dave,

Your method worked, but I want the macro to go to a particular location where the file is going to be saved. For example, the “Save as” dialog box comes up and I verify or change the filename and the macro saves the file to the first location in C drive “Spreadsheet folder”. The “Save as” dialog comes up again and I again verify or change the filename and the macro saves the file in the second location in G drive in the “data” folder. The macro continues for the last location. This way I don’t have to navigate to a particular drive/folder every time I save a file.