Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Graphic objects and Add-In problems

Hello all,
I have a very wierd behavior problem.

I am writting an Add-In. Most of the time it works correctly, however
sometimes a user's computer will get into such a state that if my
Add-In is loaded, the Drawing and Graphics objects will stop working
correctly, even for spreadsheets that should not be interacting with my
Add-In.

My Add-In creates several functions to retrieve some data, handle menu
events, and catch sheet change events. It doesn't create or manipulate
any graphic or drawing object within Excel in any way.

I have a couple of spreadsheets that have some Text boxes from the
Excel Drawing menu with text in them, but no functions calls that my
Add-In would catch.

If my Add-In loads first, either automatically at startup or by
manually activating it in Tools|Add-Ins dialog, the spreadsheet will
not display the Text boxes correctly, borders will not render properly,
scrolling the spreadsheet will be incredibly slow, any graphics in the
Text Box will not draw properly or may dissappear altogether. The CPU
load also goes to 100% and stays there for several seconds. If I set
Tools|Options-[View]Objects=Hide all, then the scrolling and the rest
of the spreadsheet loads fine.

If, on the other hand, I load the spreadsheet first, and then manually
load the Add-In, the spreadsheet works fine.

I have added debug logging to try to debug this problem and Excel does
not appear to be even calling my Add-In functions while working within
the spreadsheet.

It is difficult to get Excel into this state, however once it IS in
this state, closing down Excel, or even killing its process will not
fix the problem. One must reboot Windows to fix it.

We see the problem in several versions of Windows (XP, 2000 & 98 have
been tried). We also see the problem in Excel 2000, and Excel XP. So
it doesn't appear to be Windows or Excel version specific.

To summarize:
1) The Spreadsheet has no functions which call the Add-In code.
2) If the Add-In loads first, I have problems.
3) If the spreadsheet with graphics loads first, it works fine.
4) If I turn off displaying the graphics the problem goes away but of
course so do my graphics.
5) Killing and restarting Excel doesn't fix the problem.
6) It appears that I am not having memory issues.

Could this be a bug in Excel's graphic library?

-alan

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 129
Default Graphic objects and Add-In problems

Hi,

you might have many objects in your sheet or temp folder.
try this:

Sub CountShapes()
Dim i As Long, sh As Object
Debug.Print String(40, "-")
Debug.Print "Workbook", "Sheet", "Shapes"
Debug.Print String(40, "-")
For i = 1 To ExecuteExcel4Macro("COLUMNS(DOCUMENTS(3))")
With Workbooks(ExecuteExcel4Macro("INDEX(DOCUMENTS(3)," & i & ")"))
For Each sh In .Sheets
Debug.Print .Name, sh.Name, sh.Shapes.Count
Next
End With
Next
End Sub

Sub TempFiles()
With CreateObject("Scripting.FileSystemObject").GetSpec ialFolder(2)
MsgBox .Files.Count & " files in " & .Path
End With
End Sub

--
HTH,

okaizawa


wrote:
Hello all,
I have a very wierd behavior problem.

I am writting an Add-In. Most of the time it works correctly, however
sometimes a user's computer will get into such a state that if my
Add-In is loaded, the Drawing and Graphics objects will stop working
correctly, even for spreadsheets that should not be interacting with my
Add-In.

My Add-In creates several functions to retrieve some data, handle menu
events, and catch sheet change events. It doesn't create or manipulate
any graphic or drawing object within Excel in any way.

I have a couple of spreadsheets that have some Text boxes from the
Excel Drawing menu with text in them, but no functions calls that my
Add-In would catch.

If my Add-In loads first, either automatically at startup or by
manually activating it in Tools|Add-Ins dialog, the spreadsheet will
not display the Text boxes correctly, borders will not render properly,
scrolling the spreadsheet will be incredibly slow, any graphics in the
Text Box will not draw properly or may dissappear altogether. The CPU
load also goes to 100% and stays there for several seconds. If I set
Tools|Options-[View]Objects=Hide all, then the scrolling and the rest
of the spreadsheet loads fine.

If, on the other hand, I load the spreadsheet first, and then manually
load the Add-In, the spreadsheet works fine.

I have added debug logging to try to debug this problem and Excel does
not appear to be even calling my Add-In functions while working within
the spreadsheet.

It is difficult to get Excel into this state, however once it IS in
this state, closing down Excel, or even killing its process will not
fix the problem. One must reboot Windows to fix it.

We see the problem in several versions of Windows (XP, 2000 & 98 have
been tried). We also see the problem in Excel 2000, and Excel XP. So
it doesn't appear to be Windows or Excel version specific.

To summarize:
1) The Spreadsheet has no functions which call the Add-In code.
2) If the Add-In loads first, I have problems.
3) If the spreadsheet with graphics loads first, it works fine.
4) If I turn off displaying the graphics the problem goes away but of
course so do my graphics.
5) Killing and restarting Excel doesn't fix the problem.
6) It appears that I am not having memory issues.

Could this be a bug in Excel's graphic library?

-alan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Graphic objects and Add-In problems

I tried this macro and I only have a handful of objects, the larger of
the two spreadsheet I have has 16, the smaller has 8.
-alan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Graphic objects and Add-In problems

I have add-ins with a very similar problem - (I have only looked at Office
2003).

In my case there are always 2 add-ins involved ("myaddin.xla" and
"another.xla"). and it seems to be linked to database connections:

If I just load "myaddin.xla", all the graphics in subsequently opened
worksheets are fine

If I load "myaddin.xla" and "another.xla" (any order) , the graphics are not
always shown in susequently opened worksheets

If I show a graphic first, and then load "myaddin.xla" and "another.xla",
everything works fine

The key issue is that "another.xla" perfoms database access. I have seen
this problem with three different "another.xla"
1) Is one I've written that uses ADO to connect to an Access database.
2) I have also heard that it happens when "another.xla" is a 3rd party
addin connecting to a proprietry database format.
3) Also happens with an add-in that uses DAO to read an Access database

I'd really like to know what's going wrong!

RichardT


" wrote:

Hello all,
I have a very wierd behavior problem.

I am writting an Add-In. Most of the time it works correctly, however
sometimes a user's computer will get into such a state that if my
Add-In is loaded, the Drawing and Graphics objects will stop working
correctly, even for spreadsheets that should not be interacting with my
Add-In.

My Add-In creates several functions to retrieve some data, handle menu
events, and catch sheet change events. It doesn't create or manipulate
any graphic or drawing object within Excel in any way.

I have a couple of spreadsheets that have some Text boxes from the
Excel Drawing menu with text in them, but no functions calls that my
Add-In would catch.

If my Add-In loads first, either automatically at startup or by
manually activating it in Tools|Add-Ins dialog, the spreadsheet will
not display the Text boxes correctly, borders will not render properly,
scrolling the spreadsheet will be incredibly slow, any graphics in the
Text Box will not draw properly or may dissappear altogether. The CPU
load also goes to 100% and stays there for several seconds. If I set
Tools|Options-[View]Objects=Hide all, then the scrolling and the rest
of the spreadsheet loads fine.

If, on the other hand, I load the spreadsheet first, and then manually
load the Add-In, the spreadsheet works fine.

I have added debug logging to try to debug this problem and Excel does
not appear to be even calling my Add-In functions while working within
the spreadsheet.

It is difficult to get Excel into this state, however once it IS in
this state, closing down Excel, or even killing its process will not
fix the problem. One must reboot Windows to fix it.

We see the problem in several versions of Windows (XP, 2000 & 98 have
been tried). We also see the problem in Excel 2000, and Excel XP. So
it doesn't appear to be Windows or Excel version specific.

To summarize:
1) The Spreadsheet has no functions which call the Add-In code.
2) If the Add-In loads first, I have problems.
3) If the spreadsheet with graphics loads first, it works fine.
4) If I turn off displaying the graphics the problem goes away but of
course so do my graphics.
5) Killing and restarting Excel doesn't fix the problem.
6) It appears that I am not having memory issues.

Could this be a bug in Excel's graphic library?

-alan


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
Problems Inserting Objects in an Excel 2007 Spreadsheet [email protected] Excel Discussion (Misc queries) 0 May 18th 09 10:40 PM
Editing problems with embedded Excel objects Andre Excel Discussion (Misc queries) 0 June 11th 07 09:46 PM
Ability for Excel to find and replace graphic objects (like Word) Marjan S Excel Worksheet Functions 4 August 26th 05 03:44 AM
Linked excel objects in word, and my resulting problems :) Paul DeMarco Excel Programming 2 July 30th 04 01:55 PM
new class w/ graphic objects Tony Rizzo Excel Programming 1 June 7th 04 02:18 PM


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

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

About Us

"It's about Microsoft Excel"