title: Excel VBA copy data to txt file - why do you replace the character?
body: <p>There is a simple macro that copies all the data on a defined worksheet and saves it in .txt format. The problem is that the decimal number in one of the columns is not separated by a comma but by a dot during the save. I would like to eliminate this somehow, but so far all my attempts have been in vain.</p>
  <p>VBA code:</p>
  <pre><code>Dim myPath As String, myFile As String
      myPath = ThisWorkbook.Path &amp; &quot;\&quot;
      myFile = Application.UserName + &quot;_SAP_árlista_betöltő_&quot; + Format(Now(), &quot;YYYY_MM_DD_hhmmss&quot;) &amp; &quot;.txt&quot;
      Dim WB As Workbook, newWB As Workbook
      Set WB = ThisWorkbook
      Application.ScreenUpdating = False
      Set newWB = Workbooks.Add
      WB.ActiveSheet.UsedRange.Copy newWB.Sheets(1).Range(&quot;A1&quot;)
      With newWB
          Application.DisplayAlerts = False
          .SaveAs Filename:=myPath &amp; myFile, FileFormat:=xlTextWindows
          .Close True
          Application.DisplayAlerts = True
      End With
      WB.Save
      Application.ScreenUpdating = True
      Range(&quot;A1:J670&quot;).Select
      Selection.ClearContents
      Range(&quot;A1&quot;).Select
      MsgBox &quot;Az adatok mentésre kerültek!&quot;
  End Sub
  </code></pre>
  <p>Thanks for the tips!</p>
  <p>Geri</p>