Re: UserForm Is A Class
- From: "Jonathan West" <jwest@xxxxxxxx>
- Date: Sat, 10 Dec 2005 22:29:53 -0000
"Greg Maxey" <gmaxey@xxxxxxxxxxxxxxxxxxx> wrote in message news:eSXLlQd$FHA.3568@xxxxxxxxxxxxxxxxxxxxxxx
Jonathan,
You said:No. This syntax will also cause the QueryClose and Terminate events to fire Sub FunWithForms() Dim oForm as myForm Set oForm = New myForm oForm.Show End Sub
In this case, the Unload is done implictly when then routine ends and the oForm variable goes out of scope. This triggers the QueryClose and Terminate events.
I see the Terminate event, but not the QueryClose event.
If I call with: Sub CM6() Dim oForm As myForm Set oForm = New myForm oForm.Show Set oForm = Nothing End Sub
Debug.Print shows: myForm initialized. myForm activated myForm terminated.
Ah, correct. I had forgotten that QueryClose is not triggered when the form simply drops out of scope having been hidden. That's not a case I use often.
-- Regards Jonathan West - Word MVP www.intelligentdocuments.co.uk Please reply to the newsgroup Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
.
- Follow-Ups:
- Re: UserForm Is A Class
- From: Greg Maxey
- Re: UserForm Is A Class
- References:
- UserForm Is A Class
- From: Greg Maxey
- Re: UserForm Is A Class
- From: Greg Maxey
- Re: UserForm Is A Class
- From: Jonathan West
- Re: UserForm Is A Class
- From: Greg Maxey
- Re: UserForm Is A Class
- From: Jonathan West
- Re: UserForm Is A Class
- From: Greg Maxey
- Re: UserForm Is A Class
- From: Jonathan West
- Re: UserForm Is A Class
- From: Greg Maxey
- UserForm Is A Class
- Prev by Date: Re: UserForm Is A Class
- Next by Date: Re: UserForm Is A Class
- Previous by thread: Re: UserForm Is A Class
- Next by thread: Re: UserForm Is A Class
- Index(es):
Relevant Pages
|
Loading