|
Sub エクスポート()
'[txtファイルへ書き出し]
Dim Ans As Integer
Dim C As Range
Dim SAry As Variant
Dim Buf As String
Do
MyF = Application _
.GetSaveAsFilename("telbook", "txt ファイル (*.txt), *.txt")
If MyF = False Then
Ans = MsgBox("テキストの保存を中止しますか", 36)
End If
Loop While Ans = 7
If MyF <> "" Then
Open MyF For Output Access Write As #1
For Each C In Range("A2", Range("A65536").End(xlUp))
With WorksheetFunction
SAry = .Transpose(.Transpose(C.Resize(, 9).Value))
End With
Buf = Join(SAry, ","): Print #1, Buf: Erase SAry
Next
Close #1
End If
End Sub
で、どうでしょーか ?
|
|