Hey Prasad, welcome to VBAX
Thanks for the code, but it works almost just like my original code.
Here's the order of events as I see it when close is pressed:
Workbook_BeforeClose is fired
If Thisworkbook.Saved = False then (UI is displayed)
If user presses Yes Then
Workbook_BeforeSave event fires
Workbook_Deactivate event fires
ElseIf user presses No Then
Workbook_Deactivate event fires
ElseIf user presses Cancel Then
....No event as far as I've seen (I wish there was / is).
I need to know if there's an event here or not...cause I have an idea of what will work.
End If
Else
Workbook_Deactivate event fires
End If
I would like to use Global boolean values to determine whether or not to delete the toolbar. I think it would work great...but I can't figure out the right way to follow the events