I have a gms file which I used many times in X6 (32 bit). It worked without problems and I am trying to use it in X8 (32 bit) and works without PutInClipboard...
A code like following does return two question marks each time (in Debug.Print Window)... In fact it returns:"??". I Pasted from clipboard. In the edit window I could see two rectangles...
Code:
Sub CopyToClipboard()
Dim clipboard As MSForms.DataObject
Dim strSample As String
Set clipboard = New MSForms.DataObject
strSample = "This is a sample string"
clipboard.SetText strSample
clipboard.PutInClipboard
End Sub
I of course have the reference to "Microsoft forms 2.0 object library". The code works in Excel 2010 on the same computer (Windows 10)...
It looks the text is in clipboard but but not Unicode...
Any clue?
Thanks in advance!