title: split spreadsheet/excel file into multiple csv files with UTF-8 encoding
body: <p>The below code successfully converts big excel files in to csv files with the specified number of rows.
  How ever I want the output file to be UTF-8 encoded CSV files.</p>
  
  <p>How to add UTF-8 code to below, I would like to combine the below splitting file code with UTF-8 conversion code</p>
  
  <pre><code>Sub test()
  Dim wb As Workbook
  Dim ThisSheet As Worksheet
    Dim NumOfColumns As Integer
    Dim RangeToCopy As Range
    Dim RangeOfHeader As Range        'data (range) of header row
    Dim WorkbookCounter As Integer
    Dim RowsInFile                    'how many rows (incl. header) in new files?
    Application.ScreenUpdating = False
  
    'Initialize data
    Set ThisSheet = ThisWorkbook.ActiveSheet
    NumOfColumns = ThisSheet.UsedRange.Columns.Count
    WorkbookCounter = 1
    RowsInFile = 5                   'as your example, just 10 rows per file
  
    'Copy the data of the first row (header)
    Set RangeOfHeader = ThisSheet.Range(ThisSheet.Cells(1, 1), ThisSheet.Cells(1, NumOfColumns))
  
    For p = 2 To ThisSheet.UsedRange.Rows.Count Step RowsInFile - 1
      Set wb = Workbooks.Add
  
      'Paste the header row in new file
      RangeOfHeader.Copy wb.Sheets(1).Range("A1")
  
      'Paste the chunk of rows for this file
      Set RangeToCopy = ThisSheet.Range(ThisSheet.Cells(p, 1), ThisSheet.Cells(p + RowsInFile - 2, NumOfColumns))
      RangeToCopy.Copy wb.Sheets(1).Range("A2")
  
      'Save the new workbook, and close it
      wb.SaveAs ThisWorkbook.Path &amp; "\" &amp; Left(ThisWorkbook.Name, Len(ThisWorkbook.Name) - 4) &amp; "_v" &amp; WorkbookCounter &amp; ".csv", FileFormat:=xlCSV
      wb.Close True
  
      'Increment file counter
      WorkbookCounter = WorkbookCounter + 1
    Next p
  
    Application.ScreenUpdating = True
    Set wb = Nothing
  End Sub
  </code></pre>