# GetFormat
{: .no_toc }

Returns whether the **DataObject** holds a value in the given clipboard format, as a **Boolean**.

Syntax: *object*.**GetFormat(** *Format* **)**

*object*
: *required* An object expression that evaluates to a **DataObject**.

*Format*
: *required* A **ClipboardConstants** value identifying the format to test for --- for example `vbCFText`, `vbCFUnicodeText`, `vbCFBitmap`, `vbCFFiles`.

The result is **True** if the **DataObject** can produce a value in *Format*, **False** otherwise. Use this before calling [**GetData**](/tB/Packages/VBRUN/DataObject/GetData.md) when the format may not be present, so that an unknown format does not silently return **Empty**.

### Example

```tb check_build
If Data.GetFormat(vbCFFiles) Then
    Dim Path As Variant
    For Each Path In Data.Files
        Debug.Print Path
    Next Path
End If
```

### See Also

- [GetData](/tB/Packages/VBRUN/DataObject/GetData.md) method
- [GetFormatByName](/tB/Packages/VBRUN/DataObject/GetFormatByName.md) method
- [AvailableFormats](/tB/Packages/VBRUN/DataObject/AvailableFormats.md) method
- [SetData](/tB/Packages/VBRUN/DataObject/SetData.md) method
