简体   繁体   English

我上面的Excel-VBA代码有什么问题?

[英]What's wrong with my above Excel-VBA code?

我希望VBA实现的功能的简要说明:我试图从两个Excel电子表格中导入数据,然后比较每个列表中的数据以找到每个列表中的缺失元素,然后在缺少数据行时突出显示该数据行。

Well there is a certain kind of order required to run Differences. 好吧,运行“差异”需要某种指令。 Import_buttonx has to be called before Differences can be called. 必须先调用Import_buttonx,然后才能调用差异。 So you get an out of index because stringOfSheet(1,2) probably ha no value. 因此您会失去索引,因为stringOfSheet(1,2)可能没有任何值。 It's probably nil. 可能是零。 You can check while debugging through your code. 您可以在调试代码时进行检查。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM