Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Global detection of active control when text is pasted to a control

Posted on 2002-03-18
5
Medium Priority
?
127 Views
Last Modified: 2010-05-02
There are a set of controls including Text Boxes in a Form.

I am pasting a text onto a Text Box using Mouse/Ctrl+V. Is there any way can the Form Identify in which Control/Text Box the value has been pasted. Can I access the value which has been pasted ?
Is there any API Event or Function through which it can be detected.
0
Comment
Question by:alramanathan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 40 total points
ID: 6876778
Easy if you use the Text1_Change event or similar for each control that you could paste into.
0
 
LVL 28

Expert Comment

by:AzraSound
ID: 6876979
If you set the form's KeyPreview property to True, you could use something like this, as an example of the code to implement:


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If (Shift And vbCtrlMask) Then
        If KeyCode = Asc("V") Or KeyCode = Asc("v") Then
            MsgBox "Text pasted into " & Me.ActiveControl.Name & _
                vbCrLf & vbCrLf & "Text pasted: " & Chr(34) & _
                Clipboard.GetText & Chr(34)
        End If
    End If
End Sub
0
 
LVL 15

Expert Comment

by:ameba
ID: 6877635
alramanathan, please, give FEEDBACK in your other question

http://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20276373



0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7634133
Hi alramanathan,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept TimCottee's comment(s) as an answer.

alramanathan, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:kodiakbear
ID: 7665958
Moving to the paq

kb
Experts Exchange Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

609 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