title: csv output from excel error but other data types work correctly?
body: <p>Ok I am attempting to write a Macro that saves an excel Workbook into a csv file. I have tried many different solutions but I am still having issues getting the values to print properly. when I open the file it produces. The rest of the code I left out all it does is takes the original spreadsheet and copys the contents into a temporary sheet so I can take multiple sheets from the same WB and print them to the same csv file. it also has a module that will clear all formatting and contents of that temporary file. I ran the code to just print it to a new excel spreadsheet and it worked fine just will not print to a csv not sure why</p>
  
  <p>out put looks like this:</p>
  
  <pre><code>K     ! bîh^     [Content_Types].xml ¢(
  [… skip a bunch of binary lines …]
  KÆ8k¡~¥-ÙÔäá ûÜ
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>Sub SaveFile()
  Dim NewName As String
  Dim nm As Name
  Dim ws As Worksheet
  
  If MsgBox("Copy specific sheets to a new workbook" &amp; vbCr &amp; _
  "New sheets will be pasted as values, named ranges removed" _
  , vbYesNo, "NewCopy") = vbNo Then Exit Sub
  
  With Application
      .ScreenUpdating = False
  
       '       Copy specific sheets
       '       *SET THE SHEET NAMES TO COPY BELOW*
       '       Array("Sheet Name", "Another sheet name", "And Another"))
       '       Sheet names go inside quotes, seperated by commas
      On Error GoTo ErrCatcher
      Sheets(Array("Raw Data Copy")).copy
      On Error GoTo 0
  
       '       Paste sheets as values
       '       Remove External Links, Hperlinks and hard-code formulas
       '       Make sure A1 is selected on all sheets
      For Each ws In ActiveWorkbook.Worksheets
          ws.Cells.copy
          ws.[A1].PasteSpecial Paste:=xlValues
          ws.Cells.Hyperlinks.Delete
          Application.CutCopyMode = False
          Cells(1, 1).Select
          ws.Activate
      Next ws
      Cells(1, 1).Select
  
       '       Remove named ranges
      For Each nm In ActiveWorkbook.Names
          nm.Delete
      Next nm
  
       '       Input box to name new file
      NewName = "test"
  
       '       Save it with the NewName and in the same directory as original
      ActiveWorkbook.SaveCopyAs ThisWorkbook.path &amp; "\" &amp; NewName &amp; ".csv"
      ActiveWorkbook.Close SaveChanges:=False
  
      .ScreenUpdating = True
  End With
  Exit Sub
  
  ErrCatcher:
  MsgBox "Specified sheets do not exist within this workbook"
  End Sub
  </code></pre>