Running the subroutine RunMe works before August 2019 Windows update.
Running the subroutine RunMe fails after August 2019 Windows update. It reports the following error message: "Invalid procedure call or argument (Error 5)"
Public Sub RunMe()
Dim wksTestArray() As Worksheet
MsgBox SendArrayToFunction(wksTestArray())
End Sub
Public Function SendArrayToFunction(ByVal vntArray As Variant) As Boolean
SendArrayToFunction = True
End Function
Please note: The error only occurs for an unallocated array.
It can be useful for a function to accept a Variant, which can be either an Array of values, or an Array of objects, for example, IsArrayAllocated is an example function where this would be required.
Is there a fix?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…