Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Bug - Add OLE Object to Worksheet crashes out Excel 2002 SP3 | Excel Programming | |||
Japanese Excel 2002 crashes because of CoTaskMemFree, why? | Excel Programming | |||
Excel 2002 crashes | New Users to Excel | |||
Excel 2002 Crashes | Excel Programming | |||
excel 2002 -Userforms and macros help | Excel Programming |