Access/VBA Library

SetClipboardData

Places data on the Clipboard in a specified Clipboard format.

See also: https://msdn.microsoft.com/en-us/library/windows/desktop/ms649051(v=vs.85).aspx

Syntax

SetClipboardData( wFormat, hMem )
Parameters
Name Type Description
wFormat Long Required. The Clipboard format. This module uses CF_TEXT only.
hMem Long Required. A handle to the data in the specified format.
Return value

Long : NULL if the function failes, otherwise the handle to the data.

Code
Declare Function SetClipboardData Lib "user32" (ByVal wFormat As Long, ByVal hMem As Long) As Long

See also

  • CopyStringToClipboard