See the code I added (variable is wrkname)
I think I have it figured out with this piece of VBA saved as a macro:
Dim rLastCell As Range
Dim rCells As Range
Dim strName As String
Dim lLoop As Long, lCopy As Long
Dim wbNew As Workbook
Set rLastCell = .Cells.Find(What:="*", After:=[A1],
For lLoop = 1 To rLastCell.Row Step 2000
lCopy = lCopy + 1
Set wbNew = Workbooks.Add
.Range(.Cells(lLoop, 1), .Cells(lLoop + 2000,
wbNew.Close SaveChanges:=True, Filename:=wrkname & lCopy & "Rows" &
lLoop & "-" & lLoop + 2000
What I don't know how to do is save the orininal workbook name instead
of "chunk"........ A modification to that line of code would be very cool.
This is the PC Technical Discussion for iSeries Users (PcTech) mailing list
To post a message email: PcTech@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: PcTech-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.