Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I would like to specify a default file name when a user selects either the Save or Save As commands from the Menu bar in excel. I have thought about inserting a button on the excel spreadsheet and using VB to load the Save / SaveAs dialog box, but this would mean disabling the normal Save / Save As menu command buttons. The default File name would include a static name XXX followed by todays date. Any advise would be greatly apprieciated. Many Thanks SM |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to control the name assigned to the file, then you will need to
provide the interface with the user. sName = Application.GetSaveAsFilename( InitialFilename:="XXX" & format(date,"yyyymmdd") & ".xls") sName will contain the fully qualified path the user had chosen, but getsaveasfilename does not save the file. You can then save it with Activeworkbook.SaveAs sName But if you already know what the name should be, why involve the user. Why not just save the file with that name. -- Regards, Tom Ogilvy "SMAN" wrote in message ... Hello, I would like to specify a default file name when a user selects either the Save or Save As commands from the Menu bar in excel. I have thought about inserting a button on the excel spreadsheet and using VB to load the Save / SaveAs dialog box, but this would mean disabling the normal Save / Save As menu command buttons. The default File name would include a static name XXX followed by todays date. Any advise would be greatly apprieciated. Many Thanks SM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I disable the Save command for an Excel file? | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
How do I set the save default not to include .xls in name of file | Excel Discussion (Misc queries) | |||
"Save As" default is a .txt file | Excel Discussion (Misc queries) | |||
can i save an existing .xls file as a .csv file using command line | Excel Discussion (Misc queries) |