Hello Gurus,
How can i display the Selected Item in listbox in textbox?
For Example: If I select, "1" in the Listbox, textbox1 will display "1", so on and so forth.
I've attached my file.
Thanks in advance Gurus!
Hello Gurus,
How can i display the Selected Item in listbox in textbox?
For Example: If I select, "1" in the Listbox, textbox1 will display "1", so on and so forth.
I've attached my file.
Thanks in advance Gurus!
Here's one way.
![]()
Private Sub ListBox1_Change() TextBox1.Value = ListBox1.Value End Sub
If posting code please use code tags, see here.
Thanks Norie!
Hi Norie,
One thing, how can I amend the code to display in the listbox including the header for the below code?
![]()
Dim lngMyRow As Long For lngMyRow = 2 To Cells(Rows.Count, "B").End(xlUp).Row If StrConv(Range("D" & lngMyRow), vbUpperCase) = "WAITING FOR APPROVAL" Then ListBox1.AddItem Range("A" & lngMyRow) End If Next lngMyRow
Sorry, I don't quite follow.
Do you want a header in the listbox?
If you do then you would need to use RowSource to populate it.
Yes Norie, i want to display also the Header in the Listbox. For the attached file, i want to display the 'Account Number' header and below is the account numbers. How can i do that?
You can't unless you use RowSource to populate the listbox from a contiguous range on a worksheet.
Why not just add a small label just above the listbox with the caption 'Account No'?
Last edited by Norie; 05-14-2014 at 08:23 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks