Excel VBA: Overflow error

六月ゝ 毕业季﹏ 提交于 2019-12-01 19:25:37

If you don't find the value koniec before row 32767, your variable wiersz will max out. If you want to continue past that, you should redefine it as Long.

You should also provide an exit for your loop, e.g. existing at the last used row. Instead of a do ... loop, I usually use the following code:

Dim lLastRow As Long, lWiersz As Long

lLastRow = Cells(Rows.Count, kolumna).End(xlUp).Row

For lWiersz= 1 To lLastRow


Next lWiersz
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!