tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,924
- Office Version
- 365
- 2019
- Platform
- Windows
Why does this not work?
I expected the above to return 0.
Instead I get a division by zero error message.
Thanks
Code:
Dim DataArray(1 To 10, 1 To 10) As Variant
Dim a As Integer, b As Integer
a = 1
b = 0
DataArray(1, 1) = Application.WorksheetFunction.IfError(a / b, 0)
I expected the above to return 0.
Instead I get a division by zero error message.
Thanks
Last edited: