range - 如何设置一个不会返回 Nothing 的范围?
问题描述
早上好,
我有一个范围集来从受保护的工作表、关闭的工作簿、远程备份单元中的单元格中检索值。我想尽一切办法阻止它返回任何东西,但我就是做不到。
请参阅下面的示例。
Dim MyArray As Variant
Dim MyRange As Range
Set MyRange = ExecuteExcel4Macro("'" & "\\WDSENTINEL\Documents\HALTON PROJECTS\YEAR " & UserForm2.ComboBox1.Value & "\" & M + N & "\" & "[" & "Master.xlsm" & "]" & "Shipping" & "'!" & Range("D12").Address(True, True, -4150))
ReDim Preserve MyArray(N)
MyArray(N) = MyRange.Value2
然后,我意识到我之前为其他目的设置的所有范围,在过去几周一直运行良好的范围也开始返回 Nothing。
Excel 上是否存在配置/设置问题,设置为在这些范围内不返回任何内容?
解决方案
推荐阅读
- javascript - NodeJS 如何处理循环中相同函数的并行执行?
- javascript - 如何在未选中的单选按钮旁边获取输入文本值?
- javascript - 我有一个 Uncaught TypeError: Cannot set property 'value' of null 错误
- reactive-programming - Project Reactor 的 or() 运算符使用问题
- mysql - 用户在同一天的 30 分钟内执行的最大连续操作数
- solr - 简单的 solr 查询不起作用 - 我错过了什么?
- javascript - 解决 fetch 承诺以获取内部价值
- flutter - Flutter 和 Angular Dart 都共享组件模式,但是这两个框架之间的一个根本区别是什么?
- django - 获取聚合中Max记录的ID
- python - 我们可以使用列表推导来初始化嵌套列表吗?