| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 426 人关注过本帖
标题:[求助]大哥大姐 快来帮我看看啊???
只看楼主 加入收藏
y448935314
Rank: 1
等 级:新手上路
帖 子:31
专家分:0
注 册:2007-2-13
收藏
 问题点数:0 回复次数:3 
[求助]大哥大姐 快来帮我看看啊???

图片附件: 游客没有浏览图片的权限,请 登录注册

各位大哥大姐帮我看看到底哪里错了呀????? 顺便帮我看看 这个小程序有没有什么错误的地方啊?
这个小程序我都搞了一天了???!~~~~~

Private Sub Command1_Click()
If Option1.Value = True Then
If Check1.Value = 1 Then
Text1.Text = Option1.Caption + " " + Check1.Caption
Else
If Option2.Value = True Then
If Check2.Value = 1 Then
Text1.Text = Option2.Caption + " " + Check2.Caption
Else
If Option3.Value = True Then
If Check3.Value = 1 Then
Text1.Text = Option3.Caption + " " + Check3.Caption
End If

If Option2.Value = True Then
If Check2.Value = 1 Then
Text1.Text = Option2.Caption + " " + Check1.Caption
Else
If Option1.Value = True Then
If Check1.Value = 1 Then
Text1.Text = Option1.Caption + " " + Check2.Caption
Else
If Option3.Value = True Then
If Check3.Value = 1 Then
Text1.Text = Option3.Caption + " " + Check3.Caption
End If

If Option3.Value = True Then
If Check3.Value = 1 Then
Text1.Text = Option3.Caption + " " + Check1.Caption
Else
If Option1.Value = True Then
If Check1.Value = 1 Then
Text1.Text = Option1.Caption + " " + Check2.Caption
Else
If Option2.Value Then
If Check2.Value = 1 Then
Text1.Text = Option2.Caption + " " + Check3.Caption
End If
End If
End If
End If
End Sub ←老在这里显示:编译错误 块if没有 end if (删除也不管用 加上也不管用?

Private Sub Command2_Click()
End
End Sub

Private Sub Command3_Click()
Text1.Text = ""
End Sub

[此贴子已经被作者于2007-2-18 15:43:22编辑过]

搜索更多相关主题的帖子: 大姐 
2007-02-18 13:20
121038
Rank: 1
等 级:新手上路
威 望:2
帖 子:414
专家分:0
注 册:2005-8-3
收藏
得分:0 

缺少End if,有多少个If就要有多少个End if(一般情况下)

你这样的写代码很不方便,一点也不规范


2007-02-18 13:32
121038
Rank: 1
等 级:新手上路
威 望:2
帖 子:414
专家分:0
注 册:2005-8-3
收藏
得分:0 

如果你这样写代码,哪里却End if就一目了然了

if 条件1 then
if 条件2 then
……
end if
else
if 条件3 then
if 条件4 then
……
end if
end if
end if


2007-02-18 13:34
b13690976754
Rank: 1
等 级:新手上路
威 望:2
帖 子:835
专家分:7
注 册:2006-11-9
收藏
得分:0 

If Dir(\"alive\") <> \"\" And Dir(\"ideal\") <> \" Then Print \"strive\" End If
2007-02-18 15:11
快速回复:[求助]大哥大姐 快来帮我看看啊???
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018499 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved