投稿日 | : 2006/12/19(Tue) 09:57 |
投稿者 | : 魔界の仮面弁士 |
Eメール | : |
URL | : |
タイトル | : Re^3: 複数のテキストボックスの内容を1つのcsvファイルへ |
> 説明不足で申し訳ないのですが、
MultiLine でしたか。
さすがに、そこまで読み取ることは出来ませんでした。(^_^;)
とりあえず、こうかな。
'それぞれを改行で区切る
Dim col1() As String, col2() As String
col1 = Split(Text2.Text, vbCrLf)
col2 = Split(Text3.Text, vbCrLf)
'区切った個数を調べる
Dim upper1 As Integer, upper2 As Integer, maxUpper As Integer
upper1 = UBound(col1)
upper2 = UBound(col2)
maxUpper = IIf(upper1 < upper2, upper2, upper1)
'出力
Dim index As Integer
For index = 0 To maxUpper
Print #intFileNo, Tab(1);
If index <= upper1 Then
Print #intFileNo, col1(index);
End If
Print #intFileNo, ",";
If index <= upper2 Then
Print #intFileNo, col2(index);
End If
Next