Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 disliking an old sheet's basic commands


Hi all

I recently dug up a 2-year-old spreadsheet script of mine, writte
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,
peculiar error appears.

After a certain point in the code, any VB calls to the spreadshee
fail. this includes all cell reading, writing, chart selection the lot
Any interaction, it seems, returns the 'Application-defined o
Object-defined' error. The point at which this error starts to appea
is when an add-in object that issues callbacks is activated - th
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 o
sorts. I'm a little hazy on how it works tbh).

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

--
F*S
-----------------------------------------------------------------------
F*SH's Profile: http://www.excelforum.com/member.php...fo&userid=3635
View this thread: http://www.excelforum.com/showthread.php?threadid=56518

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default Excel 2003 disliking an old sheet's basic commands

Is this relevant ?
http://support.microsoft.com/?scid=k...512&sid=global

NickHK

"F*SH" ¼¶¼g©ó¶l¥ó·s»D:FSH.2bk633_1153926907.2099@excelfor um-nospam.com...

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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 disliking an old sheet's basic commands


Thanks for the replies. I know I'm a little vague, it's a little
difficult to explain.

Most of my code is kosher and works a charm. There is one section,
where an object is created. You won't recognise it; it's internally
developed, but it is intantiated as so:
-Set hsdmConnection = New historical.Telemetry-
I bunch of parameters are set for -hsdmConnection-, and then one of
it's methods are called, which 'starts' the object. Until another
method to 'stop' it is called, the object listens to an external data
source and, when that data source changes, a third method is invoked
(so the data change can be imported to Excel and processed). While the
object is 'running', VB just stalls with a load of sleeps for a certain
time at which point the stop command is send. At no point the object is
destroyed while running, but I do remove it shortly after I issue a
stop command, when it is no longer needed.

The problem is is that, after the object is 'set running', I cannot
interact with the spreadsheet, even when it has stopped. Even basic
stuff, such as a range("X").value = ... these all return
object/application defined errors. It's almost as if the object is
'stealing' focus and not returning it and that any methods are being
invoked as if the scope was the -hsdmConnection -object. But I tried
adding 'Sheet1.range...', in an attempt to address it correctly, but it
didn't like it.

Probably still vague, and for that I apologise. But since this only
affects XL2003 and not XL2000, I think you are right in saying that
it's a line somewhere being differently executed. But all my code is
very basic, and nothing there 'dangerous'. No -ends- or anything. I've
stepped trhough, following each line, but nothing seems out of the
ordinary until, out of teh blue, a sheet interaction fails.

Nick: I can't see that being too relevant, but it might be. I can't
install it myself but I'll ask my admin to put it on for me..

Thanks


--
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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2003 disliking an old sheet's basic commands


Correction: reading cells can be done. Just trying to modify them the
causes problems. I can do this line:
-msgbox(range("A1").value) -
but not
-range("A1").value = "foo"
-
I guess this rules out any 'focus theft' and instead suggests that the
sheet is made read-only to VBA. Editing the spreadsheet in Excel works
fine while running. Any ideas what might cause this?


--
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

Reply
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
Why 39 sec. delay for simple commands, Excel 2003? Thanks! fmes Excel Discussion (Misc queries) 1 December 19th 09 02:10 PM
how to use my Excel 2003 DTF commands Ravi Manian Excel Worksheet Functions 1 July 11th 08 09:02 AM
use lotus 1-2-3 commands in excel 2003 Rik J Excel Worksheet Functions 3 February 10th 06 05:36 PM
Visual Basic commands for email David Overington Excel Programming 1 February 9th 05 02:39 AM
xlm solver commands in excel 2003 aspo Excel Programming 2 November 16th 04 03:29 PM


All times are GMT +1. The time now is 12:47 PM.

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

About Us

"It's about Microsoft Excel"