![]() |
How do I write code to enable drag/drop from ListBox on UserForm to a cell.
Hi,
I have a userform with a listbox. I want to enable drag/drop from the listbox to a cell. A ListBox does not have DragBehavior property unlike a ComboBox. How do I do that? |
How do I write code to enable drag/drop from ListBox on UserForm to a cell.
Hello
You could use a textbox control with its DragBehavior property enabled and place the selected element from the list using the Listbox_Click event for instance. HTH Cordially Pascal "Zoo" a ecrit dans le message de news: ... Hi, I have a userform with a listbox. I want to enable drag/drop from the listbox to a cell. A ListBox does not have DragBehavior property unlike a ComboBox. How do I do that? |
How do I write code to enable drag/drop from ListBox on UserForm to a cell.
Thank you for your reply, papou.
Do you mean that the textbox should be placed on the ListBox? ______________ |ListBox | | ___________ | ||TextBox| | <- TextBox on ListBox? ||___________| | |______________| "papou" wrote in message ... Hello You could use a textbox control with its DragBehavior property enabled and place the selected element from the list using the Listbox_Click event for instance. HTH Cordially Pascal "Zoo" a ecrit dans le message de news: ... Hi, I have a userform with a listbox. I want to enable drag/drop from the listbox to a cell. A ListBox does not have DragBehavior property unlike a ComboBox. How do I do that? |
How do I write code to enable drag/drop from ListBox on UserForm to a cell.
Oops apologies, this suggestion was stupid!
Place the Textbox somewhere in your Userform so that you can drag and drop its value onto your sheet. And make it visible! ;-) Cordially Pascal "papou" a écrit dans le message de news: ... Hi No, I mean it could be placed on your Userform, and may be with its Visible property set to false so that it won't confuse users. HTH Cordially Pascal "Zoo" a ecrit dans le message de news: ... Thank you for your reply, papou. Do you mean that the textbox should be placed on the ListBox? ______________ |ListBox | | ___________ | ||TextBox| | <- TextBox on ListBox? ||___________| | |______________| "papou" wrote in message ... Hello You could use a textbox control with its DragBehavior property enabled and place the selected element from the list using the Listbox_Click event for instance. HTH Cordially Pascal "Zoo" a ecrit dans le message de news: ... Hi, I have a userform with a listbox. I want to enable drag/drop from the listbox to a cell. A ListBox does not have DragBehavior property unlike a ComboBox. How do I do that? |
All times are GMT +1. The time now is 08:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com