有人可以帮我在这里找到错误吗?
If Not r Is Nothing Then
r.Select
Else
If Not rr Is Nothing Then
rr.Select
Else
If Not rrr Is Nothing Then
rrr.Select
Else
End If
答案 0 :(得分:5)
您的代码存在的问题是,您使用的是If Else If
而不是If ElseIf
,您需要执行以下操作:
If Not r Is Nothing Then
r.Select
Else
If Not rr Is Nothing Then
rr.Select
Else
If Not rrr Is Nothing Then
rrr.Select
Else
End If
End If
End If
或者
If Not r Is Nothing Then
r.Select
ElseIf Not rr Is Nothing Then
rr.Select
ElseIf Not rrr Is Nothing Then
rrr.Select
Else
End If
第二个可能更好。