Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default automation error kills excel

Hi,
I'm writing an excel application that essentially loads and parses a
text file into a spreadsheet. The data in the spreadsheet is later
used to generate a number of drawings on blank excel charts. When I
start to include text-box shapes on the charts I get the following
error messages.

"Run-time error '-2147417848 (80010108)':
Method 'Name' of object 'Shape' failed

Click Debug

Run-time error '-2147417848 (80010108)':
Automation error
The object invoked has disconnected from its clients.

Click Debug

Excel - Application error
The instruction at "0x650215cd" refereced memory at "0x6575c089". The
memory could not be read

At this point excel wipes out. A snippet of the code where it dies
is....

....
Dim ourchart As Chart
Dim shp As Shape
Dim chartnum As Integer, loop1 As Integer

Set ourchart = ActiveChart
For Each shp In ourchart.Shapes
If Left(shp.name, 4) = "LINE" Then shp.Delete <- Failure
point
Next

....

Unfortunately, the errors occur randomly during the drawing process.
When an event is generated by the user, the drawing subroutine deletes
and redraws everything.

So, any suggestions? I've been wondering about the delete/redraw
process. Is it possible that excel doesn't clean up properly and
'loses track' eventually when new shapes are added with the same names
as those just deleted. The problem occurs on 2 different machines,
one with windows 2000/office 2000, and the other XPhome, XP office.

One final observation. This problem really only occurs when I start
inserting a lot of textbox shapes.

Thanks for any help.


Simon
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default automation error kills excel

do you get errors while imputting and parsing the text file?


---
Message posted from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default automation error kills excel

bdcrisp wrote in message ...
do you get errors while imputting and parsing the text file?


---
Message posted from http://www.ExcelForum.com/


Occasionally... however it turned out that the code snippet I posted
had quite a lot to do with it. For speed reasons I decided to rewrite
parts of the code and avoid looping through all the shapes to see if I
wanted to delete them. I suspect that deleting a shape whilst in the
middle of a "for each shp in shapes" causes memory problems in excel
somewhere.

Thanks,

Simon
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
Automation error running an excel add-in Edison Wong Excel Programming 0 September 25th 03 06:44 PM
Excel 2000 Automation Error Felix[_2_] Excel Programming 0 September 18th 03 04:56 AM
Excel 2000 Automation Error Bob Enagonio Excel Programming 1 September 17th 03 07:25 PM
Excel 2000 Automation Error Felix[_2_] Excel Programming 0 September 17th 03 04:03 PM
VB Excel Automation Error Sasanka Pinidiya Excel Programming 0 August 26th 03 08:11 AM


All times are GMT +1. The time now is 06:41 AM.

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"