初学VBS,编写了一段,内容如下,有什么毛病,为什么运行不了?

[复制链接]
查看11 | 回复3 | 2008-8-14 21:22:22 | 显示全部楼层 |阅读模式
Dim answer
answer=Inputbox("请输入xxx是不是大坏蛋,请输入yes或no","好人评定系统",answer())
If answer=yes then

Msgbox"恭喜你,答错了",vbinformation,"错误"
If answer=no then

Msgbox"很遗憾,答对了",vbinformation,"正确"
Else

Msgbox"请输入yes或no",vbexclamation,"程序错误"
End If

回复

使用道具 举报

千问 | 2008-8-14 21:22:22 | 显示全部楼层
Dim answeranswer = InputBox("请输入xxx是不是大坏蛋,请输入yes或no", "好人评定系统")If answer = "yes" Then
MsgBox "恭喜你,答错了", vbInformation, "错误"ElseIf answer = "no" Then
MsgBox "很遗憾,答对了", vbInformation, "正确"Else
MsgBox "请输入yes或no", vbExclamation, "程序错误"End If
回复

使用道具 举报

千问 | 2008-8-14 21:22:22 | 显示全部楼层
不明白你为什么要在inputbox的第三个参数写上answer()。。。
回复

使用道具 举报

千问 | 2008-8-14 21:22:22 | 显示全部楼层
Dim answer answer=Inputbox("请输入xxx是不是大坏蛋,请输入yes或no","好人评定系统") If answer="yes" then Msgbox"恭喜你,答错了",vbinformation,"错误" ElseIf answer="no" then Msgbox"很遗憾,答对了",vbinformatio
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行