**1. Tan VBA Function – Description**

The **Tan VBA** function returns the tangent value. In order to calculate the value of tngens, we should use this function. For example, the tangent of 0 is equal to 0.

**2. VBA Tan function – Syntax**

'datatalk.pl Tan (Number As Double) As Double

**Number** : The number for which we want to calculate the tangent value.

**Function return** : Double / numeric value.

**3. VBA Tan Function Example**

How to use **Tan ** function in VBA Excel? The following are examples of using the Tan function in the VisualBasic Editor.

**Example 1** : An example of using the Tan VBA function – result in the MsgBox window.

'officeinside.org Dim dblNumber As Double dblNumber = 0 MsgBox Tan (dblNumber)

**Example 2** : VBA Tan – function example – result in an Excel sheet.

'officeinside.org Dim dblNumber2 As Double dblNumber2 = 0 Range ("A1") = Tan (dblNumber2)

**4. VB Tan function – Additional information**

- none

**5. Tan VisualBasic function – Where to use?**

The function can be used in: Excel 2003, Excel 2007, Excel 2010, Excel 2013, Excel 2016.

The article is part of the VBA Excel function list. You can find a list of all VBA functions at this address: VBA functions .