Private Sub Command1_Click() Cls Dim a(1 To 10) As Integer Dim xb As Integer, min As Integer For i = 1 To UBound(a) a(i) = Val(InputBox("请你输入第" & i & "个数", , "1")) Print a(i); Next i Print xb = 1: min = a(1) For i = 2 To UBound(a) If a(i) < min Then min = a(i): xb = i Next i Print "下标值", "最小值" Print xb, min End Sub