V zásadě máte pravdu, ale při programování ve VBA
se musí dávat pozor na odlišnosti proti školní praxi.
Bez výkladů příklady použití: &nbs p;
Excelem: &nbs p; výsledek vzorec:
&nbs p;   ; 36 = –6^2
VBA: &nbs p;
&nbs p; Option Explicit
&nbs p; Option Base 1
&nbs p; Const c1 = 6
&nbs p; Const c2 = -6
&nbs p; Sub mocnina()
&nbs p; Dim x%, y% &nbs p;
&nbs p; x = -6
&nbs p; y = x ^ 2
&nbs p; MsgBox y 'y = 36
&nbs p; y = -6 ^ 2
&nbs p; MsgBox y 'y = -36
&nbs p; y = c1 ^ 2
&nbs p; MsgBox y 'y = 36
&nbs p; y = c2 ^ 2
&nbs p; MsgBox y 'y = 36
&