Not sure why but if you add Chr(13) to the TextArea and then save the output as a file then look at the Hex in the file the Chr(13) is '0A' which is Chr(10). The code below works. *Public Mglobal As String Public Sub Form_Open() TextArea1.text = "Hello" & Chr(13) & "World" & Chr(13) & "Hello " & Chr(13) & "World" & Chr(13) File.Save("~/delete.txt", TextArea1.text) 'Have a look at this file in a Hex viewer End Public Sub Button1_Click() Mglobal = TextArea1.Text Mglobal = Replace$(TextArea1.Text, Chr$(10), "|") TextArea1.text = Mglobal End*
-- View this message in context: http://gambas.8142.n7.nabble.com/How-to-replace-chr-13-from-a-text-file-tp55908p55910.html Sent from the gambas-user mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user