Retrieve the selection (click) from a listbox and display it in a Textbox.
Solved
#jquem#
Posted messages
76
Status
Member
-
#jquem# Posted messages 76 Status Member -
#jquem# Posted messages 76 Status Member -
Hello,
I'm trying to create a form where I've implemented product searching by keyword.
When the list of products appears, I would like that by clicking on the chosen product, it shows up in a TextBox and the content of the ListBox disappears.
Can someone help me, please?
(for your information, I'm "doodling," but I've never had any VBA courses.
Thank you in advance.
I'm trying to create a form where I've implemented product searching by keyword.
When the list of products appears, I would like that by clicking on the chosen product, it shows up in a TextBox and the content of the ListBox disappears.
Can someone help me, please?
(for your information, I'm "doodling," but I've never had any VBA courses.
Thank you in advance.
Related links:
- Allow copy/paste in a textbox
- How to transfer data from a listbox to the sheet?
- Mail merge: make the leading 0 appear in a phone number
- Value of a textbox in a cell with decimal number format
- Instantly retrieve the TextBox value in an Excel cell
- How to apply color formatting in a Word/Excel mail merge
5 answers
-
Hello,
When you talk about "form", you need to be more specific:
- Userform?
- Form controls in a sheet?
- ActiveX controls in a sheet?
m@rina
--
From now on, if a user tells me "it doesn't work" without any more information..., I'm giving up! -
-
Hello,
Normally you should have a macro that initializes your listbox.
Then you create a macro that will activate on a click in your listbox:
Private Sub ListBox1_Click()
Dim choice
choice = Me.ListBox1.Value
Me.TextBox1.Value = choice
Me.ListBox1.Clear
End Sub
m@rina
-
Is it possible to send you my file via monpartage.fr?
This would allow you to identify my gaps, or even mistakes...
Thank you
je@n -