Vba 如果不是,则在多个条件下为零
谁能帮我找出这里的错误吗Vba 如果不是,则在多个条件下为零,vba,excel,Vba,Excel,谁能帮我找出这里的错误吗 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 代码的问题在于您使用了If-Else If而不是If-ElseIf,您需要执行以下操作之一: If Not r Is Nothing Then r.Select Else
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
代码的问题在于您使用了
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 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
或
第二个可能更好。有什么错?你有什么错误吗?请多讲点背景。你的目标是什么,你的代码产生了什么结果?错误是什么?你有什么错误吗?请多讲点背景。你的目标是什么,你的代码会产生什么结果?