Thread
:
"Microsoft Excel has encountered a problem..."
View Single Post
#
2
Posted to microsoft.public.excel.programming
Ken Dahlberg
external usenet poster
Posts: 16
Microsoft Excel has encountered a problem...
A testimonial: since posting this, I downloaded and ran Rob Bovey's
CodeCleaner. It reduced the xls file size by 85 kb and *seems* to
have cured the crash problem...KD
(Ken Dahlberg) wrote in message . com...
There is a point where my VBA(Excel XP) code stops executing with the
message "Microsoft Excel has encountered a problem and needs to close.
We are sorry for the inconvenience." (Aw! How compassionate!) It
happens while initializing an instance of a class called DVrnt, which
implements another class called DataField:
CODE FROM DVrnt CLASS MODULE:
----------------------------
Option Explicit
Option Base 1
Implements DataField
private df as DataField
.
.
.
' Initialize the implemented DataField
Private Sub Class_Initialize()
Set df = New DataField <==== EXCEL DIES HERE
End Sub
The initialization sub for the DataField class doesn't do anything,
and doesn't need to:
CODE FROM DataField CLASS MODULE:
--------------------------------
Private Sub Class_Initialize()
End Sub
Yesterday I debugged the whole project that contains this code and it
all worked. Then, with no further changes, this behavior started.
What can cause this kind of crash, and how is a person supposed to
debug it???? Thanks for any tips. (I went through Microsoft's error
reporting thing and followed their links hoping for help, but this was
unproductive).
Ken Dahlberg
Reply With Quote
Ken Dahlberg
View Public Profile
Find all posts by Ken Dahlberg