Option Explicit
Public Sub ExportData()
Dim wbTarget As Workbook
Dim wbSource As Workbook
Dim wsRoutes As Worksheet
Dim wsCheckpoints As Worksheet
Dim wsAllowableValues As Worksheet
Dim sOpenFile As String
Set wbSource = ActiveWorkbook
Set wbTarget = Workbooks.Add
Application.DisplayAlerts = False
wbTarget.SaveAs Filename:="C:\Meridium\Rounds\ROUNDS_LOADER_SHEET.xls", FileFormat:=xlExcel7, ConflictResolution:=xlLocalSessionChanges
'Once we are saved, set thangs
Dim i As Integer
Dim sheets(1 To 3) As String
sheets(1) = sWSRoutes
sheets(2) = sWSCheckpointList
sheets(3) = sWSAllowableValues
'Copy the sheets we want to copy
For i = LBound(sheets) To UBound(sheets)
wbSource.sheets(CStr(sheets(i))).Copy After:=wbTarget.sheets(i)
With wbTarget
.sheets(CStr(sheets(i))).Rows("1:3").Delete 'Range(.Cells(1, 1), .Cells(3, 1))
End With
Next i
wbTarget.sheets("Sheet1").Delete
Application.DisplayAlerts = True
wbTarget.Close SaveChanges:=True
End Sub