Solved

Drag And Drop Into Word VBA ListBox Produces No Events

Posted on 2002-04-23
5
1,170 Views
Last Modified: 2012-08-13
In a Word VBA application, I have a ListBox inside of a Tab control and I am trying to drag and drop files into the ListBox.  Inside of the BeforeDropOrPaste method, I put a simple MsgBox to see when the event fires.  Apparently, it never does.  I did the same with the BeforeDrag event and those events come through just fine.  What am I missing?
0
Comment
Question by:tewald
  • 3
5 Comments
 
LVL 3

Expert Comment

by:Bahnass
ID: 6964284
events of listbox or the other file control

May be VB understand it different than U
:-)
0
 
LVL 44

Accepted Solution

by:
bruintje earned 200 total points
ID: 6964918
Hi Tewald,

if i try this it seems to work
-new userform
-listbox on it

Private Sub ListBox1_BeforeDropOrPaste(ByVal Cancel As MSForms.ReturnBoolean _
              , ByVal Action As Long _
              , ByVal Data As MSForms.DataObject _
              , ByVal X As Single, ByVal Y As Single, _
              ByVal Effect As MSForms.ReturnEffect, ByVal Shift As Integer)
  Cancel = True
  Effect = fmDropEffectCopy
  MsgBox "hello"
End Sub

:O)Bruintje
0
 
LVL 44

Expert Comment

by:bruintje
ID: 6982954
Hi Tewald, any update on this one? :O)Bruintje
0
 
LVL 44

Expert Comment

by:bruintje
ID: 7019459
---------------------------
Hi (Name)
 
Any update on this question?

in an effort to clean up old open questions

+----------------------------------------------------+
Your options are:

1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the
participants why you wish to do this, and allow for Expert response.  This choice will include a refund
to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information
outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with
details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
 --> Post comments for expert of your intention to delete and why
 --> You cannot delete a question with comments, special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below, include the question

QID/link. http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt

Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:
Click you Member Profile to view your question history and keep them all current with updates as the
collaboration effort continues. http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp
+----------------------------------------------------+


+----------------------------------------------------+
IMPORTANT #1
+----------------------------------------------------+
EXPERTS:    Please leave any comments regarding this question here on closing recommendations
if this item remains inactive another seven (7) days.
+----------------------------------------------------+


+----------------------------------------------------+
IMPORTANT #2
+----------------------------------------------------+
Bruintjes recommendation
-PAQ
-Points to Bruintje
+----------------------------------------------------+


---------------------------
Thanks
:O)Bruintje
---------------------------
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7065442
Per recommendation, force-accepted by
Netminder
CS Moderator
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Excel Formula 6 64
VBA code snippets in a Word 2016 document 3 49
Excel formula 5 50
filter options in excel 2013 or 2016 3 33
Article by: dandraka
There are several quick shortcuts that can make your life easier in Microsoft Programs.  These simple tips and tricks will your work more productive and you faster at completing your tasks! MS Word (1) Creating Re-usable Scraps You can create s…
In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now