Thread: Easy Question
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Easy Question

Change the
with me.listbox2
back to
with userform1.listbox2

M&M wrote:

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?

"Dave Peterson" wrote:

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

M&M wrote:

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.


--

Dave Peterson


--

Dave Peterson