Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
change filename
I am looking to some VBA script to change the filename BUT without saving at
that moment. workbook.Saveas can be used but this also saves the file. I would like to have the generated name displayed as default filename when the user wants to saveas the excel sheet. (and not the name as it was opened with) regards |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
change filename
You have to perform the saveas to get the window name to change. The best
way to do what you want is to open a dialog box using the GetSaveAsfilename method and put the default name in as the Initialfilename. After the user selects the filename, then do a SaveAS. Do this at the beginning of the macro and then perform all your other operations and then do another Save at the end of the changes. application.GetSaveAsFilename(InitialFilename, FileFilter, FilterIndex, Title, ButtonText) "rob" wrote: I am looking to some VBA script to change the filename BUT without saving at that moment. workbook.Saveas can be used but this also saves the file. I would like to have the generated name displayed as default filename when the user wants to saveas the excel sheet. (and not the name as it was opened with) regards |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
change filename
I just do not want the user interaction.
The filename is created based on the output of macro calculation. But I do not want to save the file at this moment. rob "Joel" wrote: You have to perform the saveas to get the window name to change. The best way to do what you want is to open a dialog box using the GetSaveAsfilename method and put the default name in as the Initialfilename. After the user selects the filename, then do a SaveAS. Do this at the beginning of the macro and then perform all your other operations and then do another Save at the end of the changes. application.GetSaveAsFilename(InitialFilename, FileFilter, FilterIndex, Title, ButtonText) "rob" wrote: I am looking to some VBA script to change the filename BUT without saving at that moment. workbook.Saveas can be used but this also saves the file. I would like to have the generated name displayed as default filename when the user wants to saveas the excel sheet. (and not the name as it was opened with) regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change Filename in Macro | Excel Discussion (Misc queries) | |||
Change filename & auto_open | Excel Programming | |||
Change hardcoded filename | Excel Programming | |||
script to change filename | Excel Programming | |||
Change Filename | Excel Programming |