主题:请教Do循环的文本框显示问题
为什么在做DO循环时,text2不显示,只有在跳出DO循环后,text2才显示?
此程序只有两个文本框和一个command 框,text1是负责输入的,
text2框是显示的,为什么在做DO循环时,text2不显示,只有在跳出DO循环后,text2才显示?
程序如下:
Private Sub Command1_Click()
Dim second1 As Integer
Dim mess As String
second1 = Val(Text1)
mess = Text1.Text + "运行"
Text2.Text = mess
Do
If second1 = Second(Now) Then
Print "run..............run...."
mess = mess + "完毕"
Text2.Text = mess
Exit Do
End If
If Second(Now) > second1 Then
Text2.Text = "时间已过,重新输入时间"
Exit Do
End If
Loop
End Sub
哪位大侠能帮一下忙?谢谢
此程序只有两个文本框和一个command 框,text1是负责输入的,
text2框是显示的,为什么在做DO循环时,text2不显示,只有在跳出DO循环后,text2才显示?
程序如下:
Private Sub Command1_Click()
Dim second1 As Integer
Dim mess As String
second1 = Val(Text1)
mess = Text1.Text + "运行"
Text2.Text = mess
Do
If second1 = Second(Now) Then
Print "run..............run...."
mess = mess + "完毕"
Text2.Text = mess
Exit Do
End If
If Second(Now) > second1 Then
Text2.Text = "时间已过,重新输入时间"
Exit Do
End If
Loop
End Sub
哪位大侠能帮一下忙?谢谢