ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Document not saved at the end of macro (https://www.excelbanter.com/excel-discussion-misc-queries/203367-document-not-saved-end-macro.html)

Vinod[_2_]

Document not saved at the end of macro
 
Hi All,

I've written code to delete unnecessary modules and copying a module content
into 'Thisworkbook'. Upto here its working fine and end of the macro I've
written Thisworkbook.save. While executing save statement I'm getting an
error saying 'Document not saved'. I'm clicking on 'Ok' button and I'm able
to save manually.

Is there any workaround to save document?

Advanced Thanks,
Vinod



Karissa

Document not saved at the end of macro
 
Try using the term "activedocument" instead of "thisworkbook".

"Vinod" wrote:

Hi All,

I've written code to delete unnecessary modules and copying a module content
into 'Thisworkbook'. Upto here its working fine and end of the macro I've
written Thisworkbook.save. While executing save statement I'm getting an
error saying 'Document not saved'. I'm clicking on 'Ok' button and I'm able
to save manually.

Is there any workaround to save document?

Advanced Thanks,
Vinod




All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com