Clipboard clearing in Excel VBA

jeepipy Posted messages 88 Status Membre -  
Frenchie83 Posted messages 2254 Status Membre -

Hello,

I am using Excel 2013 and I have a file containing macros with many copy-pastes.

As a result, this generates numerous aims, but I notice that clearing the clipboard doesn’t work (Application.CutCopyMode = False).

Only manual clearing removes the data.

Thank you in advance.

Sincerely,

1 réponse

Frenchie83 Posted messages 2254 Status Membre 339
 

Hello,----- To clear the clipboard, apply this:----- First, open the VBA module and in 'Tools' and 'References', check: "Microsoft Forms 2.0 Object Library."----- then copy the following code:----- Sub ClearClipboard() Dim Target As dataObject Set Target = New dataObject Target.setText "" Target.putInClipboard Set Target = Nothing End Sub -----Best regards

0