>At the risk of sounding newbie, why is this bad?
>
>
Private Sub Form_Load()
>Dim lstWiz As ListBox
> with lstWiz
> .Visible = True
> .Enabled = True
> .Left = 100
> .Top = 100
> .Height = 3000
> end with
>End Sub
>
>I appreciate the info. I need sleepies now. :) TTYT,
Because this doesn't create a visual instance.
See this article to see how to add controls to a form:
http://support.microsoft.com/support/kb/articles/Q190/6/70.ASPIf a listbox control already exist at design time, a simpler way of adding instance is to set the Index property to 0 and use the Load lstWiz(x) syntax.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com