用VB6.0中inputbox函数输入数字在text文本框中进行显示的问题?
发布网友
发布时间:2024-10-04 16:51
我来回答
共1个回答
热心网友
时间:2024-11-15 22:25
Dim a(9) As Long
Private Sub Command1_Click()
Dim i As Long, b As String, c As Long'b as long 改为 string
For i = 0 To 9
N:
b = InputBox("请输入10个数字,这是第" & i + 1 & "个")
If IsNumeric(b) Then
a(i) = Val(b)'===============
Text1.Text = Text1.Text & a(i) & " "
Else
MsgBox "输入错误,请重新输入", vbOKOnly, "错误"
GoTo N
End If
Next i
End Sub