Is there anyway you can make the listbox show up everytime you go down throughout the excel file?
Is there anyway you can make the listbox show up everytime you go down throughout the excel file?
Hello benochs1,
An example would be helpful. Can you post one?
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
I have a listbox1 that has a list of items. You check which items you want to show up in listbox2 by pressing a command button. I have LIstbox1 and the command button hidden unless you double click listbox2. I want to be able to populate that column with more listboxes at the user goes down through the excel file. I'm not sure if this is possible or not. This is my code:
![]()
Private Sub CommandButton1_Click() ListBox1.AddItem TextBox1.Text TextBox1.Text = "" TextBox1.Activate End Sub Private Sub CommandButton2_Click() ListBox2.Clear For i = 0 To ListBox1.ListCount - 1 If ListBox1.Selected(i) = True Then ListBox2.AddItem ListBox1.List(i) End If Next End Sub Private Sub ListBox1_Click() End Sub Private Sub ListBox2_doubleClick() End Sub Private Sub ListBox2_Click() End Sub Private Sub ListBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean) ListBox1.Activate ListBox1.Visible = True CommandButton2.Activate CommandButton2.Visible = True End Sub Private Sub ListBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Enter As Integer) ListBox1.Visible = False CommandButton2.Visible = False End Sub
Nevermind I figured it out [SOLVED]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks