标题:报错“子程序或函数不存在”
取消只看楼主
一池子墨水
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2017-3-13
结帖率:0
已结贴  问题点数:20 回复次数:0 
报错“子程序或函数不存在”
Private Sub ns(arr As Variant)
  Dim l As Long, i As Long, j As Long
  For i = 0 To UBound(arr)
   For j = i + 1 To UBound(arr)
    If a(i) < a(j) Then
     Call nc(a(i), a(j))
     End If
    Next j
  Next i
  
For l = 0 To UBound(arr)
 Debug.Print arr(l)
 Next l
End Sub


Private Sub nc(a, b)
 Dim num As Integer
 num = a
 a = b
 b = num
End Sub


Private Sub Command1_Click()
Dim myarr As Variant
 myarr = Array(45, 68, 120, 31)
 Call ns(myarr)
End Sub
搜索更多相关主题的帖子: 子程序 
2017-03-13 20:48



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-475039-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.137817 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved