ClearClipboard

The following code snippet clears the clipboard:

Public Declare Function OpenClipboard Lib "user32" ( _
    ByVal NewOwner As Long) As Boolean
Public Declare Function EmptyClipboard Lib "user32" () As Boolean
Public Declare Function
CloseClipboard Lib "user32" () As Boolean

Sub ClearClipboard()
    If OpenClipboard(0) Then
        EmptyClipboard
        CloseClipboard
    End If
End Sub

Contact OfficeOne on email at officeone@officeoneonline.com. Copyright © 2001-2018 OfficeOne. All rights reserved.