Macro to restore previous content of clipboard


F

Fan924

I have a macro that executes several copy and pastes. The problem, If I copy something then run the macro, I have lost the original copied item. ;{

I would like to enter the macro, store the clipboard content and later exit the macro restoring the clipboard. Any ideas? Thanks. I am using excel 2000.
 
Ad

Advertisements

F

Fan924

What I do now is to clear the clipboard before exiting macro with this
Application.CutCopyMode = False
 
I

isabelle

hi Fan924,

'add a reference to the Microsoft Forms 2.0 Object Library

Sub Macro1()
Dim DataObj As New MSForms.DataObject
Dim S As String
DataObj.GetFromClipboard
S = DataObj.GetText
Debug.Print S
End Sub

isabelle

Le 2013-03-05 21:32, Fan924 a écrit :
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top