This code re-enters the Before_Close routine when it executes the ThisWorkbookClose statement so the Msgbox is output again.Please Login or Register to view this content.
Why ? And can this be avoided ?
This code re-enters the Before_Close routine when it executes the ThisWorkbookClose statement so the Msgbox is output again.Please Login or Register to view this content.
Why ? And can this be avoided ?
Hi
Try
Please Login or Register to view this content.
Maybe :
ThisWorkbook.Close method will raise Workbook_BeforeClose event, unless Application.EnableEvents is set to false (as in mohadin's code).Please Login or Register to view this content.
1. I care dog
2. I am a loop maniac
3. Forum rules link : Click here
3.33. Don't forget to mark the thread as solved, this is important
All you need to do in the 2nd case is Me.Save. No need to use Application.EnableEvents.
Reduced to essentials,
Please Login or Register to view this content.
Both solutions work.
Thank you for your help.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks