# Var

The **Var** object represents an individual user or script-defined variable. Individual **Var** objects can be accessed or enumerated from the [**Vars**](vars) object.

| Property Name      | Return Type                                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ------------------ | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| _\<default value>_ | <p><em>variant</em><br>or <em>string</em></p> | <p>The default value of the <strong>Var</strong> object returns the value of the variable itself, with one exception. If the <strong>Var</strong> object is being accessed as part of an enumeration of the <a href="vars"><strong>Vars</strong></a> collection, the default value returns the variable name.</p><p>So for instance,</p><p>For Each Var in DOpus.Vars<br>DOpus.Output("Variable name = " &#x26; Var)<br>Next</p><p>Versus:</p><p>Set Var = DOpus.Vars("myvar")<br>DOpus.Output("Variable value = " &#x26; Var)</p> |
| name               | _string_                                      | Returns the name of the variable. You cannot change the name of a variable once it has been assigned - instead, delete the variable from its collection and add a new one.                                                                                                                                                                                                                                                                                                                                                         |
| persist            | _bool_                                        | Returns **True** if the variable is persistent (saved) or **False** if not. You can set this property to change the persistence state.                                                                                                                                                                                                                                                                                                                                                                                             |
| value              | _variant_                                     | <p>Returns the value of the variable. You can set this property to change the value of the variable.</p><p>You can store any type of variable in a <strong>Var</strong> object, although not all types can be saved to disk. If you want your variable to be persistent you should only use <em>bool</em>, <em>int</em>, <em>string</em>, <em>date</em>, <em>currency</em> or a <a href="vector"><strong>Vector</strong></a> of those types.</p>                                                                                   |

| Method Name | **Arguments** | Return Type | Description                                       |
| ----------- | ------------- | ----------- | ------------------------------------------------- |
| Delete      | _none_        | _none_      | Deletes this variable from its parent collection. |
