I need to try and Paste all items saved on the clipboard into excel using VBA.
I currently have a code that does half the job, i.e it only pastes the last copied item on the clipboard but I need it to paste all items on the clipboard.
Note: this code only works when I select Tools> references and checking the box for Microsoft Forms 2.0 Object library.
'--------------beginning of code
Public Function GetOffClipboard() As Variant
Dim MyDataObj As New DataObject
GetOffClipboard = MyDataObj.GetText()
'-----------end of code
Again my question is: I need to paste all item on the clipboard to excel using VBA coding.
Thanks in advance.