![]() |
Easy Question
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. |
Easy Question
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 |
Easy Question
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 |
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 |
All times are GMT +1. The time now is 07:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com