Chris W said:
I created a Non-modal form but when i run code in its
initialize event it disappears.
How do you mean the form disappears? The Initialize event runs before the
form is displayed. Tell us how you're invoking the Initiailize event. Note
that you can cause the Initialize event to execute without the form ever
becoming visible. That will happen if you call Load on the form but never
call Show.
Do you have code in the Activate event? That fires after the form is
visible. Do you ever call Hide on the form?
One possibility is that the form is there, but it's where it can't be seen.
After you do whatever is supposed to show the form, go to the VBE Immediate
window. Put the following on a blank line and hit return.
?UserFormName.Visible
If you get true, then check the form's .Left and .Top properties. If you
get false, you're probably not making it through the Load/Initialize/Activate
process.