发表于:2003/10/26 20:45:00
#0楼
Dim temp As String
Dim payroll(2) As String
Private Sub command1_Click()
Dim payroll(2) As String
For i = 0 To 2
Label2(i).Caption = ""
Next i
ch$ = Chr(13) + Chr(0)
For i = 0 To 2
massage$ = ch$ + ch$ + ch$ + Label1(i).Caption
flag = 1
Title$ = Label1(i).Caption + "输入框"
Do While flag = 1
temp$ = InputBox$(massage$, Title$, , 100, 4500)
If temp$ <> "" Then
flag = 0
If Val(temp) > 100 Then
info1 = MsgBox("是否接受输入的数据?", 36, "练习")
If info1 = 6 Then
flag = 0
If info1 = 7 Then
flag = 1
End If
Else
flag = 0
End If
End If
payroll(i) = temp$
Loop
Label2(i).Caption = payroll(i) + "元"
Next i
End Sub
Private Sub Command2_Click()
End
End Sub
我遇到的问题是: 在调试这个程序时,提示编译错误,loop缺少do,可我的程序里明明是有do while的,请问专家我该如何解决这个问题,以后如果再遇到类似的问题该如何处理?在此先谢谢专家能在百忙中抽出时间解决我的问题,谢谢!!!