See Also Example
Returns e (the base of natural logarithms) raised to a power.
Syntax
Exp(number)
Remarks
If the value of number exceeds 709.782712893, an Overflow error occurs. The constant e is approximately 2.718282.
Note The Exp function complements the action of the Log function and is sometimes referred to as the antilogarithm.
Log Function
Math Functions
Derived Math Functions
The example uses Exp to calculate the value of e. Exp(1) is e raised to the power of 1. To try this example, paste the code into the Declarations section of a form. Then press F5 and click the form.
Sub Form_Click ()
' Exp(x) is e ^x so Exp(1) is e ^1 or e.
Dim Msg, ValueOfE ' Declare variables.
ValueOfE = Exp(1) ' Calculate value of e.
Msg = "The value of e is " & ValueOfE
MsgBox Msg ' Display message.
End Sub