Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default "Microsoft Excel has encountered a problem..."

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default 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
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
Microsoft Excel has encountered a problem suehoege Excel Discussion (Misc queries) 1 December 30th 09 03:06 PM
Microsoft Excel has encountered a problem suehoege[_2_] New Users to Excel 0 December 30th 09 10:06 AM
Microsoft Excel has encountered a problem... Frank Excel Discussion (Misc queries) 4 April 27th 09 04:13 PM
Microsoft Excel encountered a problem and needs to close tiller420 Excel Discussion (Misc queries) 0 February 22nd 07 06:46 PM
can I bypass "Windows has encountered a problem" fredashe Excel Discussion (Misc queries) 0 April 15th 06 04:53 PM


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

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"