Easy Question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code:

Private Sub CommandButton7_Click()
UserForm1.ListBox2.Add("A", "B", "C")
End Sub


I am having trouble with line 2. Im not sure how to add the "A", "B" and C
in userform 1 listbox by clicking command button 7.
 
Is this commandbutton on the same userform as the listbox?

Private Sub CommandButton7_Click()
with me.ListBox2
.Additem "A"
.additem "B"
.additem "C"
end with
End Sub
 
The command button is not in the same userform as the listbox. The command
button is in Userform2 and the listbox2 is in Userform 1. Is this gonna be a
problem?
 
Back
Top