Something like this might work:
Public Sub SplitInto100s()
Dim lastRow As Long
Dim thisRow As Long
Dim sourceSheet As Worksheet
Dim targetBook As Workbook
Dim targetSheet As Worksheet
Dim targetFile As String
targetFile = ActiveWorkbook.FullName & ".###.csv"
Set sourceSheet = ActiveSheet
Set targetBook = Workbooks.Add
Set targetSheet = targetBook.Sheets(1)
targetSheet.Name = "CSV"
targetSheet.Activate
targetSheet.Range("1:1").Value = sourceSheet.Range("1:1").Value
lastRow = sourceSheet.Cells(sourceSheet.Rows.Count, "A").End(xlUp).Row
For thisRow = 2 To lastRow Step 100
targetSheet.Range("2:101").Value = sourceSheet.Range(CStr(thisRow) & ":" & CStr(thisRow + 99)).Value
targetBook.SaveAs Filename:=Replace(targetFile, "###", CStr((thisRow + 98) / 100)), FileFormat:=xlCSVUTF8, CreateBackup:=False
Next thisRow
Application.DisplayAlerts = False
targetBook.Close False
Application.DisplayAlerts = True
End Sub
WBD
Bookmarks