How do I write code to enable drag/drop from ListBox on UserForm to a cell.

  • Thread starter Thread starter Zoo
  • Start date Start date
Z

Zoo

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?
 
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
 
Thank you for your reply, papou.

Do you mean that the textbox should be placed on the ListBox?
______________
|ListBox |
| ___________ |
||TextBox| | <- TextBox on ListBox?
||___________| |
|______________|
 
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
 
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
 
Back
Top