vb自定义变量
来源:百度知道 编辑:UC知道 时间:2024/05/17 05:35:43
一下是源码
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Sub s()
SendKeys "%S"
End Sub
Private Sub Form_Load()
Timer1.Interval = Val(Text1.Text)
//此语句出错了,请问如何才能正确
End Sub
Private Sub Timer1_Timer()
SendKeys Text1.Text
Call s
SendKeys Text2.Text
Call s
SendKeys Text3.Text
Call s
SendKeys Text4.Text
Call s
End Sub
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Sub s()
SendKeys "%S"
End Sub
Private Sub Form_Load()
Timer1.Interval = Val(Text1.Text)
//此语句出错了,请问如何才能正确
End Sub
Private Sub Timer1_Timer()
SendKeys Text1.Text
Call s
SendKeys Text2.Text
Call s
SendKeys Text3.Text
Call s
SendKeys Text4.Text
Call s
End Sub
因为你装载窗体的时候Text1里的内容可能为Text1
Private Sub Command1_Click()
Timer1.Interval = Val(Text1.Text)
Timer1.Enabled = True
End Sub
timer1.interval是整数,不能有小数点。
text1.text里是不是有小数??
错误代码是什么?我觉得没有出错