![]() |
|
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Join Date: Mar 2002
Posts: 25
|
I want to create a macro that will "save as" a new file, and prompt the user for the new file name. How do I do this?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: San Francisco, California USA
Posts: 9,322
|
It sounds like all you need is something like this line of code in your macro:
Application.Dialogs(xlDialogSaveAs).Show Any help or is it something more that you need?
__________________
Tom Urtis |
|
|
|
|
|
#3 |
|
Join Date: Mar 2002
Location: Wellington
Posts: 104
|
Hi,
You might want to try the following 2 lines of codes: iFileName = Application.GetSaveAsFilename ActiveWorkbook.SaveAs iFileName First line is the prompt for the filename, ie. user will choose the directory, and type in what filename they want to save the workbook as. And then second line is the actual saving process. HTH PS. Tom got in before me. Sorry Tom. [ This Message was edited by: BabyTiger on 2002-03-27 12:23 ] |
|
|
|
|
|
#4 |
|
Join Date: Mar 2002
Posts: 25
|
Thanks - that's what I needed. One other question - I have a series of macros within my workbook that I need to export to another workbook owned by someone self. How do I do this?
|
|
|
|
|
|
#5 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,510
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|