【发布时间】:2011-11-09 12:22:27
【问题描述】:
我收到此错误,我真的不知道为什么。
我有以下代码:
Rand = 2
LRand = ws.Cells(Rows.Count, 6).End(xlUp).Row
Do While Rand <> LRand + 1
If ws.Cells(Rand, 4).Value = "" Then
desch = InStr(ws.Cells(Rand, 5).Value, "(")
inch = InStr(ws.Cells(Rand, 5).Value, ")")
ws.Cells(Rand, 4).Value = Mid(ws.Cells(Rand, 5).Value, desch + 1, inch - desch - 1) 'here is the error
End If
Rand = Rand + 1
Loop
你们知道为什么我得到无效的过程调用或参数吗?非常感谢!
【问题讨论】:
-
你能告诉我们像这些(somename)这样的单元格(rand,5)中的值吗?
标签: excel vba error-handling