Question

Here is some math code that adds A to B:

Sub math()
    A = 23
    B = 2
    ABSumTotal = A + B
    strMsg = "The answer is " & "$" & ABSumTotal & "."
    MsgBox strMsg
End Sub

But how can I calculate a square root of ABSumTotal? Is it possible in PowerPoint VBA?

Was it helpful?

Solution

Use: Sqr()

strMsg = "The answer is " & "$" & Sqr(ABSumTotal) & "."

OTHER TIPS

You can use use ^ to compute X^(1/2)

Edit: added parenthesis

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top