回复:(huangwy)你的变量定义错了First 和 Last应该...
											 I = list(0)
    j = list(1)
这两句我是想表示I和J都是从下面程序中读出来的数据中的数
帮我看看怎么才能实现把下面程序中读出来的数据实现大小排列
谢谢了 
 Function ArraySum(arr As Variant) As Variant()
    Dim intCount As Long
    Dim ArrayDemo As String
    Dim intMark  As Long
    Dim atemp() As Variant
    Dim colTemp As Collection
    Dim strField As Integer
    Dim strLine As Integer
    Dim Lstr As String
    Dim FileNumber
   
            
   If ExistFile(NormalizePath(Trim$(colTemp(Key_DBPath))) & "BKPF.TXT") = True Then
        intCount = ReturnTxtCount(NormalizePath(Trim$(colTemp(Key_DBPath))) & "BKPF.TXT")
        
         Dim colFields As Collection
         GetFields "BKPF", colFields
        
        
         FileNumber = FreeFile   ' 取得未使用的档案代码。
         Open NormalizePath(Trim$(colTemp(Key_DBPath))) & "BKPF.TXT" For Input As #FileNumber
         Dim bGetField As Boolean
         bGetField = False
         
         Do While Not EOF(FileNumber)
             intMark = intMark + 1
             Line Input #FileNumber, Lstr
             If InStr(4, Lstr, "|") > 0 Then
                 
                 If bGetField = False Then
                     bGetField = True
                     
                 Else
                    '将所有年份均拷入临时表中
                    atemp() = Split(Lstr, "|")
                    
                    'year
                    strField = "K" & DelTabAndCrlf(atemp(colFields("FieldGJAHR")))
                    strLine = "'" & strField & "'"
                    strLine = strLine & ","
              End If
             ArraySum = atemp
             
            End If
          Loop
        Close #FileNumber
       End If
         
     Dim tempint() As Double
     
     BubbleSort tempint
 End Function