vb用call调用sub时里总是有缺少子程序函数,属性的提示,为什么?
Dima()AsIntegerPrivateSubCommand1_Click()DimmAsInteger,nAsInteger,iAsInteger,jAsInteg...
Dim a() As IntegerPrivate Sub Command1_Click() Dim m As Integer, n As Integer, i As Integer, j As Integer m = InputBox("数组行数", "数组处理", "4") n = InputBox("数组列数", "数组处理", "5") ReDim a(m, n) For i = 1 To m For j = 1 To n a(i, j) = Int(Rnd * 51 + 30) Picture1.Print a(i, j); Next Picture1.Print NextEnd Sub
Private Sub Command2_Click() Dim i As Integer, min As Integer, t As Integer min = 100 For i = 1 To UBound(a) Call min(a, i, t) If t < min Then min = t Text1.Text = Text1.Text & t & vbCrLf Next Text2.Text = minEnd Sub
Private Sub min(a() As Integer, m As Integer, k As Integer) Dim i As Integer, j As Integer k = a(m, 1) For i = 1 To UBound(a, 2) If a(m, i) > k Then k = a(m, i) NextEnd Sub 展开
Private Sub Command2_Click() Dim i As Integer, min As Integer, t As Integer min = 100 For i = 1 To UBound(a) Call min(a, i, t) If t < min Then min = t Text1.Text = Text1.Text & t & vbCrLf Next Text2.Text = minEnd Sub
Private Sub min(a() As Integer, m As Integer, k As Integer) Dim i As Integer, j As Integer k = a(m, 1) For i = 1 To UBound(a, 2) If a(m, i) > k Then k = a(m, i) NextEnd Sub 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询