如何在 PowerPoint VBA 中求平方根?

发布于 2024-08-10 23:03:07 字数 257 浏览 2 评论 0原文

下面是一些将 A 添加到 B 的数学代码:

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

但是如何计算 ABSumTotal 的平方根? 在 PowerPoint VBA 中可以吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

面犯桃花 2024-08-17 23:03:08

您可以使用 ^ 来计算 X^(1/2)

编辑:添加括号

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

Edit: added parenthesis

往日情怀 2024-08-17 23:03:07

使用:Sqr()

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

Use: Sqr()

strMsg = "The answer is " & "$" & Sqr(ABSumTotal) & "."
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文