Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass unique custom file name to Save Dialog
I have an Excel template and when the user saves his workfile, I would like
to generate an unique file and pass it to the save dialog. Any help is appreciated. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass unique custom file name to Save Dialog
You can use the SaveAs method and set your file name up as a combination of
User Name, topic and date. You and use the InputBox method to get the user name as a variable and use the format function to set the date as a string. userName = InputBox("Enter your name (1st or last?)", "User Name" fName = userName & Format(Now, "dmmmyy") & "Topic" wb.SaveAs fileName:=fName "ExcelQ" wrote: I have an Excel template and when the user saves his workfile, I would like to generate an unique file and pass it to the save dialog. Any help is appreciated. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass unique custom file name to Save Dialog
You will need to add the file extension (.xls, .xlc, etc.) to your fName.
"ExcelQ" wrote: I have an Excel template and when the user saves his workfile, I would like to generate an unique file and pass it to the save dialog. Any help is appreciated. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to pass unique custom file name to Save Dialog
Or you could use this:
Set NewBook = Workbooks.Add fName = Application.GetSaveAsFilename NewBook.SaveAs Filename:=fName which adds a new workbook and then displays the SaveAs Dialog Box so you can enter any file name you like and choose the type file extension. "ExcelQ" wrote: I have an Excel template and when the user saves his workfile, I would like to generate an unique file and pass it to the save dialog. Any help is appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save file dialog box in Excel | Excel Discussion (Misc queries) | |||
How to set file Filter in Save dialog box | Excel Programming | |||
Help with custom save as dialog box. | Excel Discussion (Misc queries) | |||
How do you disable save file dialog? | Setting up and Configuration of Excel | |||
Close file without Save Changes dialog box | Excel Programming |