Why does this not work?
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