Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/vba/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vba 如果不是,则在多个条件下为零_Vba_Excel - Fatal编程技术网

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


第二个可能更好。

有什么错?你有什么错误吗?请多讲点背景。你的目标是什么,你的代码产生了什么结果?错误是什么?你有什么错误吗?请多讲点背景。你的目标是什么,你的代码会产生什么结果?