The latest Windows 10 update has apparently introduced a serious bug in VBA (I have tested this in Office 2010 and Office 365 so probably applies to all versions). It now seems that if a variant contains an empty array, attempting to pass this to a second variant produces an error. See below;
[VBA]Sub test()
Dim x As Variant, y As Variant
x = Array()
y = x
End Sub
Sub test2(ParamArray pp())
Dim x As Variant, y As Variant
x = pp
y = x
End Sub
Sub test3()
test2
End Sub
[/VBA]
Both test1 and test3 produce Run Time error 5 Invalid Procedure Call or Argument. The second example - a ParamArray with no parameters supplied - must be a rather common situation so I suspect a lot of code is going to break... Does anyone know how to get Microsoft to do something about this?
Andrew