Method: Sqr for VBS
- Updated2024-09-12
- 1 minute(s) read
Methods > Method: Sqr for VBS
Method: Sqr for VBS
Calculates the square root of a number.
vSqr = Object.Sqr(number)
| Object | VBS Object with this method. You do not need to specify this object. |
| number | Variant Specifies a numeric expression that is greater than or equal to 0. |
| vSqr | Variant Receives the square root. |
The following example calculates the square root of various numbers:
Dim MyVar MyVar = Sqr(121) Call MsgBox(MyVar) ' Returns 11 MyVar = Sqr(0) Call MsgBox(MyVar) ' Returns 0