>>424
すいません、情報が足りなかったんですけど
テキストファイルの数字を読み込んで最大値を判定して別のテキストファイルに出力する
ということをやりたいんですけど教えて頂いたものを組み合わせた考えた↓じゃ上手くいかないです・・・
Private Sub Command1_Click()
Const file1 = "a"
Const file2 = "b"

Dim ff1 As Integer
Dim ff2 As Integer
Dim i(10) As String

ff1 = FreeFile(): Open "F:\text1.DT" For Input Access Read Lock Read Write As ff1
ff2 = FreeFile(): Open "F:\text2.DT" For Output Access Write Lock Read Write As ff2

Do Until EOF(ff1)
Line Input #ff1, i(10)

Public Function maxItem(ByRef i() As Integer) As Integer
Dim k As Long
maxItem = i(LBound(i))
For k = LBound(i, 1) + 1 To UBound(i, 1)
If maxItem < i(k) Then maxItem = i(k)
Next
Print #ff2, i(10)

Loop

End Function

これだと何が足りませんか?