Sin VBA function – How to calculate the sinus

1. Sin VBA function – Description

The Sin VBA function   returns the sine value. In order to calculate the sine value, we should use this function. For example, the sine of 0 is equal to 0.

2. VBA Sin function – Syntax

'officeinside.org 
Sin (Number As Double) As Double

Number : The number we want to calculate the sine for.

Function return : Double / numeric value.

3. VBA Sin function Example

How to use Sin  function  in VBA Excel? Below are examples of using the Sin function in the VisualBasic Editor.

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

' officeinside.org 
Dim dblNumber As Double
dblNumber = 1
MsgBox Sin (dblNumber)

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

'officeinside.org
Dim dblNumber2 As Double
dblNumber2 = 0
Range ("A1") = Sin (dblNumber2)
Excel VBA functions - Sin VBA function
Excel VBA functions – Sin VBA function

4. VB Sin function – Additional information

  • none

5. Sin VisualBasic function – Where to use?

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

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

Leave a comment

Your email address will not be published. Required fields are marked *

%d bloggers like this: