Private Sub Main2()
Dim num1 As Double
Dim myRoot As Double
num1 = 10
myRoot = SqRoot(num1)
myRoot = Format(myRoot, "#0.00")
MsgBox "The square root of " & num1 & "is " & myRoot
End Sub
Public Function SqRoot(ByVal num1 As Double) As Double
num1 = Sqr(num1)
SqRoot = num1
End Function