Comment faire la racine carrée dans PowerPoint VBA?
-
19-09-2019 - |
Question
Voici un code mathématique qui ajoute A à B:
Sub math()
A = 23
B = 2
ABSumTotal = A + B
strMsg = "The answer is " & "$" & ABSumTotal & "."
MsgBox strMsg
End Sub
Mais comment puis-je calculer une racine carrée de ABSumTotal? Est-il possible dans PowerPoint VBA?
La solution
Utilisation: Sqr ()
strMsg = "The answer is " & "$" & Sqr(ABSumTotal) & "."
Autres conseils
Avez-vous essayé la fonction Sqr?
Voir: http://msdn.microsoft.com/en- nous / bibliothèque / h2h9y284% 28VS.85% 29.aspx
Vous pouvez utiliser pour calculer ^
utilisation X^(1/2)
Edit: parenthèses ajouté
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow