读书人

VB的text值有关问题请问一下各位

发布时间: 2012-04-15 18:39:21 作者: rapoo

VB的text值问题,请教一下各位。

VB code
Public ite As IntegerPrivate Sub Command1_Click()If Text1.Text = "123456" Then     Text2.Text = Val(Text2.Text) * 5        Form1.Visible = FalseEnd IfEnd SubPrivate Sub Timer1_Timer() ite = ite + 1If ite > Text2.Text Then    Form1.Visible = True    Text1.Text = ""    Text2.Text = ""End IfEnd Sub 
在If ite > Text2.Text Then上提示类型不匹配,我都试过了,但还是不行,why????

[解决办法]
VB code
Public ite As IntegerPrivate Sub Command1_Click()If Text1.Text = "123456" Then   Timer1.Enabled = True   Text2.Text = Val(Text2.Text) * 5   Form1.Visible = FalseEnd IfEnd SubPrivate Sub Form_Load()   Timer1.Enabled = FalseEnd SubPrivate Sub Timer1_Timer() ite = ite + 1If ite > Text2.Text Then  Form1.Visible = True  Text1.Text = ""  Text2.Text = ""  Timer1.Enabled = FalseEnd IfEnd Sub 

读书人网 >VB

热点推荐