Perhaps the first thing you should do is display the file dialog box and prompt the user for a save location and then take the result of that location and place it into the code that Lee showed. I believe that the getfiled command will bring up the file save dialog.