热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如果不是在多种条件下都没有

如何解决《如果不是在多种条件下都没有》经验,为你挑选了1个好方法。

有人可以帮我在这里找到错误吗?

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

OpiesDad.. 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

第二个可能更好.



1> OpiesDad..:

你的代码的问题是你使用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

第二个可能更好.


推荐阅读
author-avatar
高淑美萱士建志
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有