如何做到在PowerPoint VBA的平方根是多少?
-
19-09-2019 - |
题
下面是添加A到B一些数学代码:
Sub math()
A = 23
B = 2
ABSumTotal = A + B
strMsg = "The answer is " & "$" & ABSumTotal & "."
MsgBox strMsg
End Sub
但我怎样才能计算ABSumTotal的平方根? 是否有可能在PowerPoint VBA?
解决方案
使用:SQR()
strMsg = "The answer is " & "$" & Sqr(ABSumTotal) & "."
其他提示
您是否尝试过的函数SQR?
请参阅: http://msdn.microsoft.com/en-我们/库/ h2h9y284%28VS.85%29.aspx
可以使用使用^
计算X^(1/2)
编辑:添加括号
不隶属于 StackOverflow