I know how to create New Forms using the "NEW" method. How can this be done to create ne List boxes??
Printable View
I know how to create New Forms using the "NEW" method. How can this be done to create ne List boxes??
You have to have one listbox already on the form (although it doesn't have to be visible). Set it's Index property to 0. Then in your code:
load listboxname(1)
load listboxname(2)
load listboxname(3)
'etc. until you have as many as you need
Private Sub Command1_Click()
Dim lst As ListBox
Set lst = Controls.Add("vb.listbox", "lst")
lst.Visible = True
End Sub
then u can set its left,right,etc...