Macro to restore previous content of clipboard

  • Thread starter Thread starter Fan924
  • Start date Start date
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.
 
What I do now is to clear the clipboard before exiting macro with this
Application.CutCopyMode = False
 
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 :
 
Back
Top