Hi all, the information below are my data :
<colgroup><col span="11"></colgroup><tbody>
</tbody>
What I'm trying to do is to search for the string "Past records(up to 52 cartridges)" and to display all these information in a combo box. Now, I'm only able to display the first column which is "Month". May I know how do i display the rest of the information? Is it something to do with offset and list index? The data above could be at random places, so i couldn't specify the range and columns that I want.
My code is shown below :
Any help is appreciated. Thank you.
Past records(up to 52 cartridges) | ||||||||||
Month | Date | Hour | Min | Cyc | OutP | OutT | InP | InT | ST | |
5 | 15 | 0 | 8 | 4 | 216 | 605 | 334 | 5492 | 0 | # |
5 | 15 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | |
5 | 15 | 0 | 26 | 0 | 0 | 0 | 0 | 0 | 0 | |
5 | 15 | 0 | 22 | 0 | 0 | 0 | 0 | 0 | 0 | |
5 | 15 | 4 | 43 | 1 | 79 | 234 | 83 | 1426 | 400 | |
5 | 15 | 0 | 1 | 5 | 288 | 884 | 417 | 7008 | 400 | |
5 | 15 | 0 | 10 | 5 | 252 | 658 | 408 | 6991 | 0 | |
5 | 15 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | |
7 | 12 | 1 | 19 | 0 | 0 | 0 | 0 | 0 | 0 | |
Cartridge type: CARTRIDGELAB |
<colgroup><col span="11"></colgroup><tbody>
</tbody>
What I'm trying to do is to search for the string "Past records(up to 52 cartridges)" and to display all these information in a combo box. Now, I'm only able to display the first column which is "Month". May I know how do i display the rest of the information? Is it something to do with offset and list index? The data above could be at random places, so i couldn't specify the range and columns that I want.
My code is shown below :
Code:
Private Sub CommandButton1_Click()
Dim SearchRange As Range
Dim FindRow As Range
Set SearchRange = Range("A1", Range("A65536").End(xlUp))
Set FindRow = SearchRange.Find(" Past records(up to 52 cartridges)", LookIn:=xlValues, lookat:=xlWhole)
row_review = FindRow.Row
Dim TheSheet As Worksheet
Set TheSheet = Sheets("Sheet1")
Do
DoEvents
row_review = row_review + 1
item_in_review = TheSheet.Range("A" & row_review)
If Len(item_in_review) > 0 Then ComboBox1.AddItem (item_in_review)
Loop Until item_in_review = ""
MsgBox "Complete"
End Sub
Any help is appreciated. Thank you.