首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

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

2012-04-15 
VB的text值问题,请教一下各位。VB codePublic ite As IntegerPrivate Sub Command1_Click()If Text1.Text

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 

热点排行