Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Program or object defined error?

Status
Not open for further replies.

notuserfriendly

Programmer
May 7, 2004
82
SE
Get this from message from Excel. Has no error code. And only happens sometimes. I suspect it has to do with running other applications while Excel is busy working with a high percentage of CPU. In my case it searches in other excel sheets for information and closes every file it searches in. By opening and closing many files sometimes up to 500-600 times it might become too heavy.

Google won't give me much
only this
but it doesn't say what it really is.

Using Office 2002 SP3 on XP
 
Hi,

What is the statement that it errors on?

Skip,

[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue]
 
probably a memory leak to be honest - if you are setting variables to reference the files with, you should set them to nothing before re-using - this only really becomes important when you are doing a lot of processing (as it sounds like you are)

Rgds, Geoff

"Having been erased. the document thjat you are seeking. Must now be retyped"

Please read FAQ222-2244 before you ask a question
 
The thing is I don't know where the statement is, it depends from time to time, normally it's when I'm inside a file reading. Been testing without IE and Messenger open, then it works fine(Skip). And yes I believe it's a memory error but the error message is not a good indicator.
I'm working against clipboard data. I might have forgotten setting it to nothing in some functions will check now (Geoff).
 


Can't you hit the Debug Button when the error occurs?

Skip,

[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue]
 
No, it kills the function. So that's why I don't know. Anyway did what Geoff told me to, but it didn't work.
I had missed setting some files to nothing even though I closed them.
 


Its not setting FILES to Nothing.

Set Objects to Nothing.

Skip,

[glasses] [red]Be advised:[/red] It's been reported that a wee psychic is roaming the countryside.
Small Medium @ Large! [tongue]
 
however it doesn't seem to help, seems like it works fine if one just doesn't touch the keyboard during processing time. Maybe a modal should do it.

 
I've noticed that the error I get is the same one gets if one interrupts the execution of a macro. Seems like it happens when using other applications, like if one of them sends an ESC to Excel.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top