在2019年8月Windows更新之前将对象数组发送到变体作品,但更新后失败 [英] Sending object array to variant works before August 2019 Windows update, but fails after update

查看:53
本文介绍了在2019年8月Windows更新之前将对象数组发送到变体作品,但更新后失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

运行子例程RunMe可以在2019年8月Windows更新之前运行.

Running the subroutine RunMe works before August 2019 Windows update.

在2019年8月Windows更新之后,运行子例程RunMe失败.它报告以下错误消息:无效的过程调用或参数(错误5)"

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.

对于函数来说,接受Variant可能很有用,该Variant可以是值数组或对象数组,例如,IsArrayAllocated是需要此函数的示例函数.

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.

有修复程序吗?

推荐答案

此更新影响VB6,VBA(包括Office的所有版本)以及VBScript!

The update affects VB6, VBA (including all versions of Office) as well as VBScript!

Microsoft当前正在调查该问题: https://support.microsoft.com/zh-cn/help/4512488/windows-8-1-update-kb4512488 (请查看标题为此更新中的已知问题"部分下的最后一行)

Microsoft is currently looking into the issue: https://support.microsoft.com/en-us/help/4512488/windows-8-1-update-kb4512488 (look at the last row under the section entitled "Known issues in this update")

更新:

Microsoft刚刚发布了针对此问题的补丁:

Microsoft just released a patch for this issue: https://support.microsoft.com/en-us/help/4517298/windows-8-1-update-kb4517298

这篇关于在2019年8月Windows更新之前将对象数组发送到变体作品,但更新后失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆