Re: Populate A ListBox!
- From: "Barry" <barry.oconnor@xxxxxxxxxxxxx>
- Date: 6 Oct 2005 11:57:29 -0700
Create New Form
Place a list box and 2 command buttons.
Insert the code below on to the for an example.
HTH
Barry
---Code---
Option Explicit
Private Function AddListItems(MyCommandButton As CommandButton)
With List1
.AddItem (MyCommandButton.Caption)
.ListIndex = 0
.Text = .List(0)
End With
End Function
Private Sub Command2_Click()
Call AddListItems(Me.Command2)
End Sub
Private Sub Command1_Click()
Call AddListItems(Me.Command1)
End Sub
Private Sub Form_Load()
Command1.Caption = "Button A"
Command2.Caption = "Button B"
End Sub
.
- References:
- Populate A ListBox!
- From: Arpan
- Populate A ListBox!
- Prev by Date: Re: Populate A ListBox!
- Next by Date: Rotated Text Help Needed
- Previous by thread: Re: Populate A ListBox!
- Next by thread: Rotated Text Help Needed
- Index(es):