|
こんにちは ^d^
>一気にテキストファイルに書き込みたいのです
Dim myPath as String
Dim N as Integer
'書き込みファイルフルパス(このマクロブックと同じフォルダ)
myPath = ThisWorkbook.Path & "\Out.txt"
N = FreeFile
Open myPath For Output As #N
> ReDim min(n)
> For i = 1 To n
> min(i) = errorsum(i, 0, 0, 0)
> For j = 0 To 18
> For k = 0 To 18
> For l = 0 To 127
> If errorsum(i, j, k, l) < min(i) Then
> min(i) = errorsum(i, j, k, l)
> x = 1.89 * j
> y = 1.89 * k
> z = 2 * l
> End If
> Next l
> Next k
> Next j
Print #N, i; ","; x; ","; y; ","; z
> Next i
>End Sub
Close #N
こんな感じでしょうか。
|
|