Check if Clipboard is Empty

To determine whether the clipboard is empty or not, count the number of formats present on the clipboard. The IsClipboardEmpty() function shown here does shows how:

Public Declare Function CountClipboardFormats Lib "user32" () As Long

Function IsClipboardEmpty() As Boolean
    IsClipboardEmpty = (CountClipboardFormats() = 0)
End Function

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