8 Replies Latest reply on Sep 18, 2018 4:50 PM by Sergio Monti

    'Copy to clipboard' in API doesn't work

    Sergio Monti

      Hi all,

      I would like to copy the string variable 'Report' to clipboard, so I copied

      ...

      ' Copy results to clipboard

          Dim ccDO As New MSForms.DataObject

          ccDO.SetText Report, 1

          ccDO.PutInClipboard

          Set ccDO = Nothing

      ...

      But I get the error

      I've got another Macro, to copy BOM to clipboard, which uses the same statements and it works fine there.

      Does anyone know the reason? Is there a way to solve the problem?

      Thanks in advance for your help.