Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userforms & Excel 2002 Crashes

Hello

I'm hitting an issue with Excel 2002 which I believe may be due to the
way that I'm defining & using UserForm objects.

Lets say I define a new form & call it frmMyForm

then within a button macro, if I use:

Dim myFrm as frmMyForm
set myFrm=new frmMyForm


I'm finding that Excel will periodically crash, or that you can't
simply right click other buttons to access their macros.

I believe that I'm disposing the form objects correctly as I can see
the Terminate macro being called when the form is closed, the purpose
of which I use to set any persisted object reference to nothing.

The reason why, I'm using the Form definition as a type rather than a
predefined object, is that I can simply create several instances of
the same form which can be open at the same time each persisting
different data sets.so the user perssing the button macro several
times can have the same form window opened several times and use each
window to display different data sets.

Are there any known issues with using this form (excuse the punn) of
invokation ? Or even with embedding Scripting.Dictionary, and 2d/3d
variant arrays within a Form Class code ?


Thanks in advance,


Steve.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 449
Default Userforms & Excel 2002 Crashes

Hi Steve

Dim myFrm as frmMyForm
set myFrm=new frmMyForm


I've used this way of writing for many years and many users. No problems
whatsoever.

Note that the debugger doesn't go too many levels down. If your form's
initialize or load or activate code does or calls something that errs, it
will halt on places like Set myFrm = new, and not take you down to where the
real problem is.

HTH. Best wishes Harald


"Steve" wrote in message
...
Hello

I'm hitting an issue with Excel 2002 which I believe may be due to the
way that I'm defining & using UserForm objects.

Lets say I define a new form & call it frmMyForm

then within a button macro, if I use:

Dim myFrm as frmMyForm
set myFrm=new frmMyForm


I'm finding that Excel will periodically crash, or that you can't
simply right click other buttons to access their macros.

I believe that I'm disposing the form objects correctly as I can see
the Terminate macro being called when the form is closed, the purpose
of which I use to set any persisted object reference to nothing.

The reason why, I'm using the Form definition as a type rather than a
predefined object, is that I can simply create several instances of
the same form which can be open at the same time each persisting
different data sets.so the user perssing the button macro several
times can have the same form window opened several times and use each
window to display different data sets.

Are there any known issues with using this form (excuse the punn) of
invokation ? Or even with embedding Scripting.Dictionary, and 2d/3d
variant arrays within a Form Class code ?


Thanks in advance,


Steve.


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
Bug - Add OLE Object to Worksheet crashes out Excel 2002 SP3 John.Greenan Excel Programming 1 June 19th 06 06:31 PM
Japanese Excel 2002 crashes because of CoTaskMemFree, why? Dave Rafkind Excel Programming 0 March 15th 05 03:45 PM
Excel 2002 crashes Veena New Users to Excel 0 February 16th 05 10:29 AM
Excel 2002 Crashes Veena Excel Programming 0 February 16th 05 10:26 AM
excel 2002 -Userforms and macros help mulr1966 Excel Programming 1 April 6th 04 08:17 PM


All times are GMT +1. The time now is 01:59 AM.

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"