Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Paste Special text or Unicode Text Kevin Excel Discussion (Misc queries) 4 May 18th 23 03:46 AM
How can I make Excel save Unicode CSV data correctly? FooBarBaz Excel Discussion (Misc queries) 0 July 17th 08 03:08 AM
How do I save a data as non-unicode text in am Excell sheet? aina Excel Discussion (Misc queries) 0 March 17th 08 10:31 AM
problem after changing non-unicode language inenewbl Excel Discussion (Misc queries) 0 January 22nd 07 03:21 PM
Changing a comma separated text file and save it. BristolBreeze Excel Discussion (Misc queries) 0 March 23rd 06 10:32 AM


All times are GMT +1. The time now is 11:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"