|
▼yokomichi さん:
こんにちは〜
セミコロン区切りですか
解決後ですが、参考です
Sub セミコロン区切り()
Dim rr As Range, r As Range
Dim io As Integer
Dim Filename As String
Dim v As Variant
Dim ss As String
Set rr = ActiveSheet.Range("A1").CurrentRegion '出力範囲
Filename = "D:\CSVMac\CSV3.csv" '出力ファイル名
io = FreeFile()
Open Filename For Output As io
For Each r In rr.Rows
v = Application.Index(r.Value, 0#)
ss = """" & Join(v, """;""") & """"
Print #io, Replace(ss, vbLf, "<BR>")
Next
Close io
End Sub
なお、最後の項目のあとにも ; をつけるなら、
> ss = """" & Join(v, """;""") & """"
は
ss = """" & Join(v, """;""") & """;"
にしてください。
|
|