J
JeffTO
Hi All
Here is a strange one
I have a command button that envokes code "mnuExit" - this code does a
bunch of different things and then closes the excel file. I have more
code in the BeforeClose and Workbook_Deactivate events.
Everything runs properly if there are no other Excel Files open -
however - IF there are other excel files open once all the code has
finished running I get a dialogue box that says:
"Applicatiob-defined or object-defined error" there is no 1004 or
anything else - and there is nothing in my code that is causing this
error - I have stepped though all of the code - I have removed all of
the code in the BeforeClose and Workbook_Deactivate events and it is
still happening
I have even removed most of the code from "mnuExit" only leaving:
ThisWorkbook.Saved = True
ThisWorkbook.Close
And the other strange thing about all of this is that if you "X" out
of the file and not use the "Exit Button" then none of this happens
Anyone have any thoughts on this or seen something similar?
Thanks in advance for any comments
Jeff
Here is a strange one
I have a command button that envokes code "mnuExit" - this code does a
bunch of different things and then closes the excel file. I have more
code in the BeforeClose and Workbook_Deactivate events.
Everything runs properly if there are no other Excel Files open -
however - IF there are other excel files open once all the code has
finished running I get a dialogue box that says:
"Applicatiob-defined or object-defined error" there is no 1004 or
anything else - and there is nothing in my code that is causing this
error - I have stepped though all of the code - I have removed all of
the code in the BeforeClose and Workbook_Deactivate events and it is
still happening
I have even removed most of the code from "mnuExit" only leaving:
ThisWorkbook.Saved = True
ThisWorkbook.Close
And the other strange thing about all of this is that if you "X" out
of the file and not use the "Exit Button" then none of this happens
Anyone have any thoughts on this or seen something similar?
Thanks in advance for any comments
Jeff