Forum Discussion
wiens
Jun 25, 2025Brass Contributor
Wrong VBA calculation answer
I am getting for a answer -1. It should be +1.
This is calculation error in VBA.
I use this version of VBA:
This bug has been resolved. I have done a clean installation of Windows and Office.
4 Replies
To pay safe, try this since VBA evaluates ^ before unary minus unless parentheses are used properly
a = (-y) ^ 2