vb问题“未找到方法或数据成员”,怎么办啊?急

来源:百度知道 编辑:UC知道 时间:2024/04/26 13:45:54
Private Sub Command1_Click()
Timer1.Enabled = True
Command2.Enabled = True
Command3.Enabled = False
End Sub

Private Sub Command2_Click()
Timer1.Enabled = False
Text1.Text = Label2.Caption + " " + Label3.Caption + " " + Label4.Caption + " " + Label5.Caption + " " + Label6.Caption
Command2.Enabled = False
Command1.Enabled = True
Command3.Enabled = True
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Timer1_Timer()
Randomize
Label2.Caption = Fix(Rnd * 90) + 10 "'这说未找到方法或数据成员
Label3.Caption = Fix(Rnd * 90) + 10
Label4.Caption = Fix(Rnd * 90) + 10
Label5.Caption = Fix(Rnd * 90) + 10
Label6.Caption = Fix(Rnd * 90) + 10
End Sub
有label2的

将这段代码:
Label2.Caption = Fix(Rnd * 90) + 10 "'这说未找到方法或数据成员
Label3.Caption = Fix(Rnd * 90) + 10
Label4.Caption = Fix(Rnd * 90) + 10
Label5.Caption = Fix(Rnd * 90) + 10
Label6.Caption = Fix(Rnd * 90) + 10
改成:
Label2.Caption = Cstr(Fix(Rnd * 90) + 10) "'这说未找到方法或数据成员
Label3.Caption = Cstr(Fix(Rnd * 90) + 10 )
Label4.Caption = Cstr(Fix(Rnd * 90) + 10 )
Label5.Caption = Cstr(Fix(Rnd * 90) + 10 )
Label6.Caption = Cstr(Fix(Rnd * 90) + 10 )
试试

不是吧,我把你的程序复制到我的VB里就能用,我没改过哦,我只是把你的注释删了。
FIX没有错,而且LABEL的CAPTION属性能接受整数

我认为不光是Label2的问题,所有标签都有问题。我想可能是标签应该是字符型,转换一下,请高手指正。

是否有lable2这个空间呢