Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
automation error kills excel
do you get errors while imputting and parsing the text file?
--- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automation error running an excel add-in | Excel Programming | |||
Excel 2000 Automation Error | Excel Programming | |||
Excel 2000 Automation Error | Excel Programming | |||
Excel 2000 Automation Error | Excel Programming | |||
VB Excel Automation Error | Excel Programming |