Results 1 to 5 of 5

Thread: How to use Text Drag N Drop

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Posts
    137

    Question

    Hi, i am not the best in VB, could someone please help me with this problem:
    I want to drag and drop selected text from a textbox or listbox, into a combo box. Please Help :-)

    Mikelo

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Posts
    137

    Unhappy ME!

    PLZ HELP!

  3. #3
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Hey take it easy man!!!!
    It were just
    Code:
    Dim d1 As Date, d2 As Date
    
    Private Sub Form_Load()
    d1 = "10-07-2000 01:36 PM"
    d2 = "10-07-2000 01:57 PM"
    MsgBox DateDiff("n", d1, d2)
    End Sub
    = 21 minutes after you posted your second post....

    Patience my boy...

    In the meantime, look at VbNet: http://www.mvps.org/vbnet/

    You'll probably find something there.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Got it for ya!

    Code:
    
    
    
    Private Sub Combo1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
    For X = 0 To List1.ListCount - 1
    If List1.Selected(X) = True Then
    Combo1.AddItem List1.List(X)
    End If
    Next X
    Combo1.Text = Combo1.List(0)
    End Sub
    
    Private Sub Form_Load()
    List1.OLEDragMode = 1
    Combo1.OLEDropMode = 1
        'Populate the list box
        For i = 0 To 20
            List1.AddItem i
        Next i
    End Sub
    Happy Now?

    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Oct 2000
    Posts
    137

    Smile Code

    Ok, thanx man!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width