VB缺少语句结束求改正

时间:2017.08.05 发布人:大眼D瞪小眼

VB缺少语句结束求改正

已解决问题

谷歌大眼D瞪小眼用户在2017.08.05提交了关于“网游之纵横天下VB缺少语句结束求改正”的提问,欢迎大家涌跃发表自己的观点。目前共有2个回答,最后更新于2025-02-27T22:18:49。

文本形式:

PrivateSubCommand2_Click()

StaticcountAsInteger

Dims

Command1.Enabled=False

count=count+i

s=x+y

Ifcoun<=3Then

Va1()函数用于将字串转化为数值

IfVa1(Text1.Text)=sThen

Labe11.Caption="对了,你真行,请单击“继续”按钮做下一题"

Command.Enab1ed=True

Command.Enab1ed=Fa1se

count=0

E1se

Labe11.Caption="错了,继续努力!”"

EndIf

E1se

Labe11.Caption="你的回答次数已超过3次,请单击“继续”按钮做下一题或单击窗口右上角的“关闭”按钮结束"

Labe12.Caption=""

Labe13.Caption=""

Command1.Enabled=True

Command2.Enabled=Fa1se

count=0

EndIf

EndSub

图片:


希望大家能够帮助她。

详细问题描述及疑问:

文本形式:

PrivateSubCommand2_Click()

StaticcountAsInteger

Dims

Command1.Enabled=False

count=count+i

s=x+y

Ifcoun<=3Then

Va1()函数用于将字串转化为数值

IfVa1(Text1.Text)=sThen

Labe11.Caption="对了,你真行,请单击“继续”按钮做下一题"

Command.Enab1ed=True

Command.Enab1ed=Fa1se

count=0

E1se

Labe11.Caption="错了,继续努力!”"

EndIf

E1se

Labe11.Caption="你的回答次数已超过3次,请单击“继续”按钮做下一题或单击窗口右上角的“关闭”按钮结束"

Labe12.Caption=""

Labe13.Caption=""

Command1.Enabled=True

Command2.Enabled=Fa1se

count=0

EndIf

EndSub

图片:


期待您的答案,感谢你,我会记得你对我的好的 !
希望以下的回答,能够帮助你。

第1个回答

用户名:whoami1978  

你程序中的出错问答的行

Va1()函数用于将字串转化为数值

只是个注释,要么你在它前面加个'(单青引号)

要么将它删除

第2个回答

用户名:e1_2013  

DimxAsSingle
DimyAsSingle
DimKAsI境儿校座烧原基nteger
Priv防安食施补怎太ateSubCommand1_Click()
Text1.Text=""
Label2.Ca互ption=""
Label4.Caption=""
Comm承积and1.Caption="继续"
x=Fix(Rnd*100)
Randomize
y=Fix(Rnd*100)
Label2.Caption=x
Label4.Caption=y
Label6.Caption=""
Co树而眼业米致皇mmand1.Enabled=False
Command2.Enabled=True
Timer1.Enabled=T推绍货范秋rue
K=0
EndSub
PrivateSubCommand2_Click()
Stati专表世再够序级士附ccountAsInteger
Dims
Command1.Ena们皇触bled=False
count=count+1
s=x+y
Ifcount<=3Then
IfVal(Text1.Text)=sThen
Label6.Caption="做对了,你真牛。请单击“继续”按钮做下一题。"
Command1.Enabled=True
Command2.Enabled=False
count=0
Else
Label6.Caption="错了,要加油!!"
EndIf
Else
Label6.Caption="你回答已超过3次,请单击“继续”按钮做下一题或单击“退出”按钮"
Label2.Caption=""
Label4.Caption=""
Text1.Text=""
Command1.Enabled=True
Command2.Enabled=False
count=0
EndIf
EndSub
PrivateSubCommand3_Click()
End
EndSub
PrivateSubForm_Load()
Timer1.Enabled=False
Timer1.Interval=1000
EndSub
PrivateSubTimer1_Timer()
K=K+1
IfK>20Then
Timer1.Enabled=False
Label6.Caption="对不起!已经超时,请重新选题!"
Command1.Enabled=True
Command2.Enabled=False
Label2.Caption=""
Label4.Caption=""
EndIf
EndSub