View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ian Digby[_3_] Ian Digby[_3_] is offline
external usenet poster
 
Posts: 15
Default USERFORM DISAPPEARS ON EXCEL MINIMIZE

Tom,
Thanks for this observation. I discovered that the cause of this problem was
the existence in memory of a "garbage" form object. Earlier in the code I had
instantiated a different form class but had not set it to "Nothing".

When Excel was minimized, this caused it to destroy the later form object.

I do not understand the mechanics of why Excel did this but anyone
experiencing similar problems should check whether they have un-terminated
form classes which have been finished with, and set them to Nothing before
displaying their latest form.

Any further discussion/observations would be most welcome.

Ian
--
Work performed in the spirit of service is worship...Baha''''i Writings


"Tom Ogilvy" wrote:

I haven't observed this behavior.

as an example, putting this in the userform module:

Private Sub UserForm_Initialize()
Application.Visible = False
End Sub

Private Sub UserForm_Terminate()
Application.Visible = True
End Sub


worked fine, showing the useform as modal or modeless

--
Regards,
Tom Ogilvy


"Ian Digby" wrote in message
...
When I minimize Excel, my VBA Userforms disappear. I thought the Userform
ThunderdFrame class window was not a child of Excel, so why does it
disappear?

Any help would be much appreciated.
--
Work performed in the spirit of service is worship...Baha'i Writings