LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Application defined or object defined error - Not Caused by Code

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


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run Time Error 1004 Application-defined or object-defined error forsimple loop? Need help with what's wrong? Naji[_2_] Excel Programming 2 October 16th 09 05:45 PM
Export a chart in a GIF file. Run-time error '1004': Application-defined or object-defined error; [email protected] Excel Programming 4 September 16th 07 11:09 PM
Copying A Range of Cells From one Sheet to Another - Error Application Defined or Object Defined Matt[_39_] Excel Programming 3 July 25th 06 01:13 AM
Application-Defined or Object-Defined Error on simple code Fid[_2_] Excel Programming 1 July 21st 05 08:30 PM
Application-Defined or Object-Defined Error on simple code [email protected] Excel Programming 6 February 22nd 05 09:03 PM


All times are GMT +1. The time now is 08:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"