求大神帮忙啊,这个程序老是报type mismatch
vb吧
全部回复
仅看楼主
level 4
0ices 楼主
Private Sub Form_Load()
Dim a As Single, b As Single, c As Single, d As Integer
a = Text1.Text
b = Text2.Text
c = Text3.Text
If b <= a Or a < 0 Or c > b Or c < a Then
Label5.Caption = "商品价格有误"
End If
Randomize
d = Int(Rnd * (b - a + 1)) + a
If d = c Then
Label5.Caption = "猜对了!"
Label5.ForeColor = &HFF&
ElseIf d > c Then
Label5.Caption = "高了"
Else
Label5.Caption = "低了"
End If
End Sub
2014年07月11日 01点07分 1
level 5
Private Sub Form_Load()
Dim a As Single, b As Single, c As Single, d As Integer
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
If b <= a Or a < 0 Or c > b Or c < a Then
Label5.Caption = "商品价格有误"
End If
Randomize
d = Int(Rnd * (b - a + 1)) + a
If d = c Then
Label5.Caption = "猜对了!"
Label5.ForeColor = &HFF&
ElseIf d > c Then
Label5.Caption = "高了"
Else
Label5.Caption = "低了"
End If
End Sub
2014年07月11日 02点07分 2
感谢大神,不过我已经自己找出来了
2014年07月11日 06点07分
@0ices 为什么?
2015年10月26日 13点10分
找出来不分享 不会了么要别人回答~唉
2016年08月30日 00点08分
1