Function Basic Extensions Class ★ Top 20 Most Useful

StringToClipboard

Place a String onto the Windows Clipboard as Text.

Signature (Visual Basic / VBA)

Public Function StringToClipboard( _
      ByVal vClipData As Variant _
    ) As Boolean

Code Example

    ? StringToClipboard("This is a test.")
    True
    ? ClipboardToString()
    This is a test.

Parameters

Parameter Description
vClipData The String that is to be placed on the Clipboard in Text format, replacing any other information currently on the Clipboard. Function returns False if vClipData is Null or cannot be fixed up to a String. Otherwise, the function places the String on the Clipboard and returns True.