简体   繁体   English

电子表格中的运行时错误

[英]Run time error in spreadsheet

thank you for your time. 感谢您的时间。 I've put stars on the error line if this helps. 如果有帮助,我会将星星放在错误行上。

I'm lost with an error and I can't find the reason. 我迷失了一个错误,我找不到原因。 Can I get some help, please? 请给我一些帮助吗? The macros is not running for only one period and I didn't find any different data in the database compare to the previous period 宏仅运行了一个周期,与上一个周期相比,我没有在数据库中找到任何其他数据

That's the debug menu: 那是调试菜单:

Get values and convert to string for text box: 获取值并转换为文本框的字符串:

a = Format(.Cells(rowNum, dateCol), "dd mmm")
a = a + ", " + Str(.Cells(rowNum, actualAssetCol))

Get values and convert to string for text box: 获取值并转换为文本框的字符串:

a = Format(.Cells(rowNum, dateCol), "dd mmm")
a = a + ", " + Str(.Cells(rowNum, actualAssetCol))`

The string concatenation operator in is & and not + . 的字符串连接运算符是&而不是+ Thus, use it like this: 因此,像这样使用它:

a = a & ", " & Str(.Cells(rowNum, actualAssetCol))`

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

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