View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Excel 2003 disliking an old sheet's basic commands

Your description is a little thin. This object that listens, I assume that
there is a class module and that somewhere in your code you create an
instance of that class (probably in the open event of ThisWorkbook)...
something like...

Set objXLEvents as New clsXLEvents

My guess is that somehow that object is being destroyed somehow while the
code is running. Perhaps an error handler is being triggered under 2003 that
is not being triggered under 2000. If anywhere in that error handler there is
a line of code "End" then all objects will be destroyed when that line
executes. Without seeng some code though it is hard to comment further...
--
HTH...

Jim Thomlinson


"F*SH" wrote:


Hi all

I recently dug up a 2-year-old spreadsheet script of mine, written
originally in VBA for XL2000. It works fine if I run it under XL2000,
but as soon as I try it with the next version of Excel, XL2003, a
peculiar error appears.

After a certain point in the code, any VB calls to the spreadsheet
fail. this includes all cell reading, writing, chart selection the lot.
Any interaction, it seems, returns the 'Application-defined or
Object-defined' error. The point at which this error starts to appear
is when an add-in object that issues callbacks is activated - the
errors seem to stop when this object is deactived (I say 'activation' -
this is when the object is set to listen for an external trigger of
sorts. I'm a little hazy on how it works tbh).

A slightly vague question, perhaps, but I'm told this is a common issue
(that said, it's not appearing in my searches). I would blame the add-in
object if it weren't for the fact this script works perfectly in XL2000.
Any ideas?


--
F*SH
------------------------------------------------------------------------
F*SH's Profile: http://www.excelforum.com/member.php...o&userid=36355
View this thread: http://www.excelforum.com/showthread...hreadid=565189