![]() |
BEFORE SAVE
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 |
BEFORE SAVE
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 . |
BEFORE SAVE
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 . |
BEFORE SAVE
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 . |
All times are GMT +1. The time now is 08:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com