For storing multiple data in Clipboard, Follow the below steps.
- Initialize the Data Object, the type of MSForms.DataObject
- Initialize a String and an Integer.
- Set the String into Data Object using SetText() method and provide format identifier
- Put the data in ClipBoard using PutInClipboard
- Fetch the data from ClipBoard using GetFromClipboard("format identifier")
Note: For working with Windows Clipboard you need DataObject, the object in MSForms library. It provides support for text-string.
For that you must add the reference Microsoft Forms 2.0 Object Library