In VB 6, the sqr()
function gives the square root of any number. The argument for the sqr()
function must be a Double
mean a real number.
In the example program below, we accept a number and return its square root.
Program Code: Sqr() Function
Private Sub Command1_Click()
Dim result As Double
result = Sqr(Val(Text1.Text))
MsgBox (result)
End Sub