# DisplayName
{: .no_toc }

Returns the name the container has assigned to the control, as a **String**. Read-only.

Syntax: *object*.**DisplayName**

*object*
: *required* An object expression that evaluates to an **AmbientProperties** object.

The host typically returns the name by which the user identifies the control --- for example `"Form1!Command1"` in a designer, or whatever label has been chosen at run time. A control can include this string in error messages, log entries, or property browsers so that the user can tell which instance the message refers to.

### Example

This example responds to a **DisplayName** change and updates the control's tooltip.

```tb check_build
Private Sub UserControl_AmbientChanged(PropertyName As String)
    Select Case PropertyName
        Case "DisplayName"
            UserControl.ToolTipText = Ambient.DisplayName
    End Select
End Sub
```

### See Also

- [LocaleID](/tB/Packages/VBRUN/AmbientProperties/LocaleID.md) property
- [UserMode](/tB/Packages/VBRUN/AmbientProperties/UserMode.md) property
