# CDbl
{: .no_toc }

Coerces an expression to a **Double**.

Syntax: **CDbl(** *expression* **)**

*expression*
: *required* Any valid string or numeric expression in the **Double** range --- `-1.79769313486231E308` to `-4.94065645841247E-324` for negative values, and `4.94065645841247E-324` to `1.79769313486232E308` for positive values.

The return type is **Double**.

**CDbl** is the internationally aware alternative to [**Val**](/tB/Modules/Conversion/Val.md) for converting a string to a numeric type. **CDbl** recognizes different decimal separators and different thousand separators properly, depending on the system's locale setting.

### Common Errors

| Error | When |
|---|---|
| [6 (`&H6`)](/Reference/Run-time-Errors.md#6), *Overflow* | *expression* is a string that holds a number outside the range of a **Double** |
| [13 (`&HD`)](/Reference/Run-time-Errors.md#13), *Type mismatch* | *expression* is a string that does not hold a number (a zero-length string included) |
| [94 (`&H5E`)](/Reference/Run-time-Errors.md#94), *Invalid use of Null* | *expression* is **Null** |

### Example

This example uses the **CDbl** function to convert an expression to a **Double**.

```tb check_build
Dim MyCurr, MyDouble
MyCurr = CCur(234.456784)                    ' MyCurr is a Currency.
MyDouble = CDbl(MyCurr * 8.2 * 0.01)         ' Convert result to a Double.
```

### See Also

- [CCur](/tB/Modules/Conversion/CCur.md), [CDec](/tB/Modules/Conversion/CDec.md), [CInt](/tB/Modules/Conversion/CInt.md), [CLng](/tB/Modules/Conversion/CLng.md), [CSng](/tB/Modules/Conversion/CSng.md), [CStr](/tB/Modules/Conversion/CStr.md), [CVar](/tB/Modules/Conversion/CVar.md) functions
