Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to private sub like workbook_beforesave to save workbook with new name.
I tried before save writing macro with saveas command in it but this caused excel to perform an illegal operation I think this is due to me asking for circular function i.e before save and saveas in same procedure. So what I am asking is before operator saves workbook I would like the name of workbook to change either with msgbox prompt or as cell.value is this possible? hope this is clear thanks Tina |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
in the BeforeSave event try something like '.... application.enableevents=false me.saveas "your_new_name.xls" application.enableevents=true '... -----Original Message----- I would like to private sub like workbook_beforesave to save workbook with new name. I tried before save writing macro with saveas command in it but this caused excel to perform an illegal operation I think this is due to me asking for circular function i.e before save and saveas in same procedure. So what I am asking is before operator saves workbook I would like the name of workbook to change either with msgbox prompt or as cell.value is this possible? hope this is clear thanks Tina . |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You may also want the CANCEL flag be set to TRUE so that Excel is not
executing a save operation (Cancel = True). "Frank Kabel" schrieb im Newsbeitrag ... Hi in the BeforeSave event try something like '.... application.enableevents=false me.saveas "your_new_name.xls" application.enableevents=true '... -----Original Message----- I would like to private sub like workbook_beforesave to save workbook with new name. I tried before save writing macro with saveas command in it but this caused excel to perform an illegal operation I think this is due to me asking for circular function i.e before save and saveas in same procedure. So what I am asking is before operator saves workbook I would like the name of workbook to change either with msgbox prompt or as cell.value is this possible? hope this is clear thanks Tina . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you with Franks and your answer it worked a treat
"Stefan Schier" wrote: You may also want the CANCEL flag be set to TRUE so that Excel is not executing a save operation (Cancel = True). "Frank Kabel" schrieb im Newsbeitrag ... Hi in the BeforeSave event try something like '.... application.enableevents=false me.saveas "your_new_name.xls" application.enableevents=true '... -----Original Message----- I would like to private sub like workbook_beforesave to save workbook with new name. I tried before save writing macro with saveas command in it but this caused excel to perform an illegal operation I think this is due to me asking for circular function i.e before save and saveas in same procedure. So what I am asking is before operator saves workbook I would like the name of workbook to change either with msgbox prompt or as cell.value is this possible? hope this is clear thanks Tina . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Save, save as, page setup dimmed out in unprotected excel sheet? | Excel Discussion (Misc queries) | |||
Save As and save current numbers not the actual formulas and links | Excel Discussion (Misc queries) | |||
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() | Excel Discussion (Misc queries) | |||
Save Excel file - prompts to save - no Volitile functions used | Excel Worksheet Functions | |||
Save As - Multiple Sheets fails to save as text file | Excel Programming |