|
-
September 25th, 2001, 08:53 AM
#1
Create New Listobox at Run-Time
I know how to create New Forms using the "NEW" method. How can this be done to create ne List boxes??
-
September 25th, 2001, 02:42 PM
#2
Re: Create New Listobox at Run-Time
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
-
September 25th, 2001, 02:48 PM
#3
Re: Create New Listobox at Run-Time
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|