I have seen similar threads but not found an answer (assume I got something wrong)
I use the very simple example below:
Sub CopyTextToClipboard()
Dim obj As New DataObject
Dim txt As String, S1 As String, S2 As String
S1 = ActiveCell.Text
With obj
.SetText S1
.PutInClipboard
S1 = vbNullString
.GetFromClipboard
S2 = .GetText()
End With
End Sub
When I run the code I see the contents of the active cell are now in the variable S2 - i.e. seems to be in the clipboard
After execution there doesn't appear to be anything in the Clipboard. I get 2 small rectangles when I do a ctrl v and there is nothing to PASTE in the Clipboard section of the HOME tab.
Any help appreciated
Bookmarks