title: CSV file from excel with fields inside double quotes
body: <p>I want to create a CSV file from excel where all data in fields will be inside double quotes.
  I found this code from a similar questions and it almost works...</p>
  
  <pre><code>Sub CSVFile()
  
  Dim SrcRg As Range
  Dim CurrRow As Range
  Dim CurrCell As Range
  Dim CurrTextStr As String
  Dim ListSep As String
  Dim FName As Variant
  FName = Application.GetSaveAsFilename("", "CSV File (*.csv), *.csv")
  
  If FName &lt;&gt; False Then
    ListSep = Application.International(xlListSeparator)
    If Selection.Cells.Count &gt; 1 Then
      Set SrcRg = Selection
    Else
      Set SrcRg = ActiveSheet.UsedRange
    End If    
    Open FName For Output As #1    
    For Each CurrRow In SrcRg.Rows
      CurrTextStr = ""
      For Each CurrCell In CurrRow.Cells
        CurrTextStr = CurrTextStr &amp; """" &amp; CurrCell.Value &amp; """" &amp; ListSep
      Next
      While Right(CurrTextStr, 1) = ListSep
        CurrTextStr = Left(CurrTextStr, Len(CurrTextStr) - 1)
      Wend    
      Print #1, CurrTextStr    
    Next    
    Close #1    
    End If
  End Sub
  </code></pre>
  
  <p>It lets me save the selected fields in a CSV and the outcome is something like this:</p>
  
  <pre><code>"A1","B1","C3"
  "A2","B2","C3"
  </code></pre>
  
  <p>What i need it also to do is put a comma after the last field too like this:</p>
  
  <pre><code>"A1","B1","C3",
  "A2","B2","C3",
  </code></pre>
  
  <p>I have no idea about this kind of code and could use some help.</p>
  
  <p>Also if this works how do i save a macro in an excel sheet so i can use it any time i need it.</p>
  
  <p>Thanks
  John</p>