Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing a macro to save as Unicode text
You might try this:
Public Sub TextNoModification() Dim Delimiter As String Dim myRecord As Range Dim myField As Range Dim sOut As String Delimiter = Chr(9) Open "Test.txt" For Output As #1 For Each myRecord In Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row) With myRecord For Each myField In Range(.Cells(1), Cells(.Row, Columns.Count).End(xlToLeft)) sOut = sOut & Delimiter & StrConv(myField.Text, vbUnicode) Next myField Print #1, Mid(sOut, 2) sOut = Empty End With Next myRecord Close #1 End Sub I changed how you were doing the delimiter too since it made no sense as the literal text "CHR(9)" -- Jim Rech Excel MVP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste Special text or Unicode Text | Excel Discussion (Misc queries) | |||
How can I make Excel save Unicode CSV data correctly? | Excel Discussion (Misc queries) | |||
How do I save a data as non-unicode text in am Excell sheet? | Excel Discussion (Misc queries) | |||
problem after changing non-unicode language | Excel Discussion (Misc queries) | |||
Changing a comma separated text file and save it. | Excel Discussion (Misc queries) |