I have an Excel spreadsheet with a macro in it to save. Clicking on the
save brings up the "Save As" dialog, giving them the option to save it as
various file types, such as Excel, CSV or TXT.
I am using the following code to do this:
fName = Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 4)
Application.Dialogs(xlDialogSaveAs).Show fName
It works fine, but should the user save it to something other than Excel --
say, a CSV format file -- then the active open workbook becomes what they
saved it to. In other words, they open MyFile.xls, save it as MyFile.csv,
and then the file they are working with is MyFile.csv, and I want them to
still be working with Myfile.xls after they have saved it.
I tried using "ApplicationDialogs(xlDialogSaveCopyAs).show fName, but that
threw an error.
Thanks in advance for any suggestions.
Bookmarks