VBA-Excel: Putting Text In The Windows Clipboard

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”
How to add “Microsoft Forms 2.0 Object Library”
Now, For putting text in the Clipboard, Follow the below steps.
Steps:
•    Initialize the Data Object, the type of MSForms.DataObject
•    Create a String
•    Set the String into Data Object using SetText() method.
•    Put the data in ClipBoard using PutInClipboard

Read moreVBA-Excel: Putting Text In The Windows Clipboard

VBA-Excel: Reference Libraries in Excel WorkBook.

There are set of built in libraries available in excel, few of them are default to your code and rest are optional to be added. These libraries contain various built in methods, objects and properties for these methods and objects. These libraries act same as namespaces in .Net, packages in Java

Below are the steps for adding reference libraries to y

our Excel workbook

  1. Open Excel workbook and press Alt + F11 to get Visual Basic Editor (VBE)
  2. Go to the Tools menu and select References from the drop down menu.
  3. References- VBAProject” dialog will appear.
Reference Libraries
Reference Libraries

Read moreVBA-Excel: Reference Libraries in Excel WorkBook.