Hi Experts,
I need some experts help to modify my present codes to run every 10000 rows values on next next execution.
example on 1st execution it should print 1 to 10000 row values, then on next execution 10001 to 20000 rows values to be print. Like that till values end in "Data" source sheet.
Sub Add()
Set filePath1 = [Details!C5]
Open filePath1 For Output As #1
Set Source = Worksheets("Data")
Set detail = Worksheets("Details")
LastRow = Source.Cells(Source.Rows.Count, "A").End(xlUp).Row
LastCol = Source.Range("XFD1").End(xlToLeft).Column
inputrow = 2
rownum = 2
colnum = 1
For rownum = 2 To LastRow
If Source.Cells(rownum, 1).Value = Source.Cells(rownum, 2).Value Then
Else
outputText = [Details!C7] & Source.Cells(rownum, 1).Value & [Details!C8] & Source.Cells(rownum, 1).Value & [Details!C9]
Print #1, outputText
outputText = [Details!C10]
Print #1, outputText
End If
Next
Close #1
End Sub
I need some experts help to modify my present codes to run every 10000 rows values on next next execution.
example on 1st execution it should print 1 to 10000 row values, then on next execution 10001 to 20000 rows values to be print. Like that till values end in "Data" source sheet.
Sub Add()
Set filePath1 = [Details!C5]
Open filePath1 For Output As #1
Set Source = Worksheets("Data")
Set detail = Worksheets("Details")
LastRow = Source.Cells(Source.Rows.Count, "A").End(xlUp).Row
LastCol = Source.Range("XFD1").End(xlToLeft).Column
inputrow = 2
rownum = 2
colnum = 1
For rownum = 2 To LastRow
If Source.Cells(rownum, 1).Value = Source.Cells(rownum, 2).Value Then
Else
outputText = [Details!C7] & Source.Cells(rownum, 1).Value & [Details!C8] & Source.Cells(rownum, 1).Value & [Details!C9]
Print #1, outputText
outputText = [Details!C10]
Print #1, outputText
End If
Next
Close #1
End Sub