Forum Discussion
Invalid procedure call or argument (VBA Error 5 Excel) in Build 19011.20000
- Jun 30, 2025
This bug has been resolved. I have done a clean installation of Windows and Office.
Are you sure the inputs for this calculation are exactly the same between those two versions you mentioned?
Because of the large number of operations in this single statement it will be rather hard to find out which part is failing. Perhaps you can split it into multiple calculation steps?
- wiensJun 25, 2025Brass Contributor
I have traced the error back to the source in a smaller formula. In the attached file, the following code has been added in the macro in the file.
===
Sub test()
x_wiel = 0
x0 = 0
y_wiel = 0
y0 = 1
f = (x_wiel - x0) ^ 2 + (y_wiel - y0) ^ 2
MsgBox SQR(f)
End Sub
===
This is not correct, f is not -1 but f is actually +1. The square root of a negative number gives the VBA error 5. This is now a major calculation error in Excel.
- wiensJun 24, 2025Brass Contributor
I have traced the error back to the source in a smaller formula. The following code has been added in the macro in the file.
===
Sub test()
x_wiel = 0
x0 = 0
y_wiel = 0
y0 = 1
f = (x_wiel - x0) ^ 2 + (y_wiel - y0) ^ 2
MsgBox SQR(f)
End Sub
===
This is not correct, f is not -1 but f is actually +1. The square root of a negative number gives the VBA error 5. This is now a major calculation error in Excel.