Re: UserForm Is A Class
- From: "Jezebel" <warcrimes@xxxxxxxxxxxxxx>
- Date: Sun, 11 Dec 2005 10:01:54 +1100
>
> "With myForm" will do an implicit Load, firing the Initialize event. So
> you don't need "Load myForm". In fact, I can't think of a case where the
> Load command is needed to ensure that you can separate the Initialize and
> Activate events.
>
I think the Load statement is a carry-over from VB, where there is a clear
distinction between creating the form as a class object and creating it as a
graphic object. In VB, when you instantiate the form object (eg set x = new
Myform), the 'class' components are created in memory, but the GUI elements
(the form as a graphic object, and its controls) are not. The GUI part is
loaded automatically (and the Load event fired) when you show the form or
refer to any control. The Load method is sometimes useful if you want to
force the GUI components to load -- eg to initialize their values -- without
showing the form or refering to any specific control.
But as you say, it's hard to think of a reason to use it in VBA.
.
- 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
- 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
|