Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

Error renaming Worksheets when addin is loaded

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vandenberg p - 30 Oct 2007 05:23 GMT
Hello:

I wrote an addin that works fine in Excel 2003. But when loaded in Excel 2007 it
causes a crash if I try to rename a worksheet in any file I happen to have open.
If I unload the addin the problem goes away.

The addin has several thousand of lines of code and I don't have a clue to where the
problem is. Does anyone have a suggestion as to where I might look for the problem?
Or what kinds of routines are likely to cause this type of problem?

Thanks for any isight.

Pieter Vandenberg
Jim Cone - 30 Oct 2007 12:51 GMT
I don't have XL 2007 (thank you) but you should be able, in the VBE,
to go to Tools | Options | General (tab) and change the Error Trapping
selection to "Break on all Errors".
Then try renaming a sheet, the code should stop when the error occurs
and you will be able to see the troublesome section.
Signature

Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)

"vandenberg p"
<pavberg@rohan.sdsu.edu>
wrote in message
Hello:
I wrote an addin that works fine in Excel 2003. But when loaded in Excel 2007 it
causes a crash if I try to rename a worksheet in any file I happen to have open.
If I unload the addin the problem goes away.

The addin has several thousand of lines of code and I don't have a clue to where the
problem is. Does anyone have a suggestion as to where I might look for the problem?
Or what kinds of routines are likely to cause this type of problem?

Thanks for any isight.
Pieter Vandenberg

vandenberg p - 01 Nov 2007 17:51 GMT
Jim:

Thank you, that's a good suggestion and I will give it a try, I don't have a good feeling
about 2007 yet, maybe it will "grow on me." I still use 2003 for most everything.

Pieter Vandenberg

:  
: I don't have XL 2007 (thank you) but you should be able, in the VBE,
: to go to Tools | Options | General (tab) and change the Error Trapping
: selection to "Break on all Errors".
: Then try renaming a sheet, the code should stop when the error occurs
: and you will be able to see the troublesome section.

: "vandenberg p"
: <pavberg@rohan.sdsu.edu>
[quoted text clipped - 3 lines]
: causes a crash if I try to rename a worksheet in any file I happen to have open.
: If I unload the addin the problem goes away.

: The addin has several thousand of lines of code and I don't have a clue to where the
: problem is. Does anyone have a suggestion as to where I might look for the problem?
: Or what kinds of routines are likely to cause this type of problem?

: Thanks for any isight.
: Pieter Vandenberg
Pieter Vandenberg - 08 Dec 2007 04:02 GMT
> I don't have XL 2007 (thank you) but you should be able, in the VBE,
> to go to Tools | Options | General (tab) and change the Error Trapping
[quoted text clipped - 20 lines]
> Thanks for any isight.
> PieterVandenberg

Hello:

Finally got back to the project and the problem is that Excel crashes
so you do not have a chance to choose to debug. And it does appear to
be a problem within Excel not in my routine, although it does appear
that my routine contributes to the problem, but Excel should really
not be crashed by something my add-in does.

Anyway still looking for any feedback on how I can trace the problem.
Thanks.

Pieter
vandenberg p - 08 Dec 2007 04:46 GMT
:> I don't have XL 2007 (thank you) but you should be able, in the VBE,
:> to go to Tools | Options | General (tab) and change the Error Trapping
[quoted text clipped - 20 lines]
:> Thanks for any isight.
:> PieterVandenberg

: Hello:

: Finally got back to the project and the problem is that Excel crashes
: so you do not have a chance to choose to debug. And it does appear to
: be a problem within Excel not in my routine, although it does appear
: that my routine contributes to the problem, but Excel should really
: not be crashed by something my add-in does.

: Anyway still looking for any feedback on how I can trace the problem.
: Thanks.

: Pieter

I wanted to follow up with the comment that if I change the sheet name
programmatically with a routine such as:


Sub renamesheet()
Dim Rsheet As String
   Rsheet = InputBox("New Name of Sheet", , "Result")
   ActiveSheet.Name = Rsheet
End Sub

Excel 2007 will not crash.

Pieter
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.