View Single Post
Old 18-11-2016, 15:47
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35
Question PutInClipboard does not work in X8 32 bit...

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...
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
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!

Last edited by FaneDuru; 19-11-2016 at 12:19.
Reply With Quote