update,
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
Option Explicit
|
||||
|
||||
Function run(start_row As Integer)
|
||||
On Error GoTo eh
|
||||
Dim last_row As Boolean
|
||||
|
||||
Dim last_check_row as integer
|
||||
last_check_row = 9999
|
||||
Dim scan_row as integer
|
||||
scan_row = start_row
|
||||
|
||||
|
||||
Dim next_row_1 As Integer
|
||||
Dim next_row_2 As Integer
|
||||
Dim next_row_3 As Integer
|
||||
Dim next_row_4 As Integer
|
||||
Dim next_row_5 As Integer
|
||||
|
||||
For i = start_row To last_check_row
|
||||
scan_row = i
|
||||
last_row = True
|
||||
|
||||
next_row_1 = i + 1
|
||||
next_row_2 = i + 2
|
||||
next_row_3 = i + 3
|
||||
next_row_4 = i + 4
|
||||
next_row_5 = i + 5
|
||||
|
||||
cell_value_1 = ReadCellValue.run("A" & CStr(next_row_1))
|
||||
cell_value_2 = ReadCellValue.run("A" & CStr(next_row_2))
|
||||
cell_value_3 = ReadCellValue.run("A" & CStr(next_row_3))
|
||||
cell_value_4 = ReadCellValue.run("A" & CStr(next_row_4))
|
||||
cell_value_5 = ReadCellValue.run("A" & CStr(next_row_5))
|
||||
|
||||
If (cell_value_1 <> "") Then
|
||||
last_row = False
|
||||
ElseIf (cell_value_2 <> "") Then
|
||||
last_row = False
|
||||
ElseIf (cell_value_3 <> "") Then
|
||||
last_row = False
|
||||
ElseIf (cell_value_4 <> "") Then
|
||||
last_row = False
|
||||
ElseIf (cell_value_5 <> "") Then
|
||||
last_row = False
|
||||
Else
|
||||
Debug.Print "done ?"
|
||||
End If
|
||||
|
||||
|
||||
if (last_row = true) then
|
||||
Debug.Print "last row found"
|
||||
|
||||
exit for
|
||||
end if
|
||||
|
||||
next i
|
||||
|
||||
run = scan_row
|
||||
Done:
|
||||
|
||||
Exit Function
|
||||
|
||||
eh:
|
||||
Debug.Print "WriteStatus"
|
||||
Debug.Print content
|
||||
|
||||
End Function
|
||||
|
Reference in New Issue
Block a user