
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
looking for a bit of help folks in translating a piece of illogic to vb.net.
I'm sure this is relatively easy for most, but I'm going round in circles.. The code is to look up an excel column (A) and find a string (textbox1.text) and then once found, write data to that row.
I have something that is working - sort of - but seems to take longer than illogic.
can anyone help in translating the code below?
any thanks in advance guys for any help with this
'Define the first row with data
RowStart = 7
'Define the amount of skipped rows
RowEnd = 1000
'Find the first empty cell
For countA = RowStart To (RowEnd * 0.01) + RowStart
'If it's not blank jump to cell + 1000. E.g. search cell A2 and then A102 etc.
If Not String.IsNullOrEmpty(GoExcel.CellValue("A" & RowEnd)) Then
'Add another 100 to searched cells
RowEnd = RowEnd + 1000
Else
'Else if it's empty exit loop
Exit For
End If
Next
End If
'Search for the file name in column A
For oRow = RowStart To RowEnd
If (GoExcel.CellValue("A" & oRow)) = oDocNumber Then
GoExcel.CellValue("C" & oRow) = DateString
Solved! Go to Solution.