LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default xlDialogSaveAs question

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.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Saved a workbook using xlDialogSaveAs, now it has a password ?!? Court Excel Programming 4 February 10th 06 10:21 PM
xlDialogs(xlDialogSaveAs) DanM Excel Programming 1 December 6th 04 05:34 PM
Setting the default filename in xlDialogSaveAs John Wirt[_6_] Excel Programming 0 May 20th 04 04:25 AM
Setting the default filename in xlDialogSaveAs John Wirt[_6_] Excel Programming 1 May 19th 04 10:17 AM
xlDialogSaveAs Tim Cadieux Excel Programming 0 September 18th 03 06:52 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"