Error 460, “Invalid Clipboard format”, fires when Clipboard code asks for data in a format the Clipboard does not currently hold. The Clipboard is multi-format: one copy operation may offer text, rich text, HTML, and an image simultaneously, or only one of them. Code that calls GetText when the Clipboard holds only a picture, or GetData with a format constant the contents do not include, raises error 460. The Clipboard is not broken; the request did not match its contents.
With Clipboard
.GetFromClipboard ' (DataObject in VBA hosts)
If .GetFormat(1) Then ' 1 = text format available
s = .GetText(1)
Else
MsgBox "The Clipboard does not contain text."
End If
End With
DataObject, whose GetFormat/GetText mirror the classic Clipboard API. The error and its logic are the same: the format requested is not among the formats offered.If GetFormat confirms the format and the read still fails, the Clipboard's owner may be slow to render the data (delayed rendering is common with large content from big applications): a brief wait and one retry succeeds where an instant grab failed. Persistent failure with the format present points at the source application, not the reader.
Why can the Clipboard hold several formats at once? Because the copying application does not know what will be pasted where. It offers the same content in several formats (text, rich text, image) and the pasting side chooses. Error 460 means the chosen format was not among those offered.
Does error 460 mean the Clipboard is empty? Not necessarily. An empty Clipboard raises it too, but the more common case is a Clipboard full of something else: the requested format is absent while others are present.