Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wait for Paste (2000)

    Is it possible to have a marco pause until the current contents of the clipboard gets pasted into a different application?

  2. #2
    Silver Lounger
    Join Date
    Dec 2000
    Location
    California, USA
    Posts
    1,758
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wait for Paste (2000)

    Try using "DoEvents" in your code.

  3. #3
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Wait for Paste (2000)

    I apologize for not being more specific.

    Currnently I have a macro that copies a cell, waits 2 seconds, then moves down a row and copies that cell. What I'd like to be able to do is copy the cell, wait until a non-Office application pastes the data, then move down to the next row.

    This is what I have so far

    <pre>Sub copy_loop()
    Copy_here:
    If Selection.Value = "" Then
    GoTo endit
    Else
    Selection.Copy
    Start = Timer
    pause = 2 + Start
    Do While Timer < pause
    DoEvents
    Loop
    End If

    Cells(Selection.Row + 1, Selection.Column).Select

    GoTo Copy_here

    endit:
    Selection.Copy

    End Sub</pre>


  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Wait for Paste (2000)

    How would Word know when a non-Office application pastes something? Is that application able to send a message or something like that?

Posting Permissions

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