L
l1075
I have a macro in which the first column of the sheet is searched for
matching itemID. Then from there I want populate a series of textboxe
located in the row with the matching itemID. The length of the row
vary and I am trying to implement my code to
read until a blank cell
here is my code so far
Dim CellQuanValue
Dim CellDesValue
Dim ItemId = some id value
Counter = 1
Dim ItemList As Variant
ItemList = shtItemId.Range("A2:A100").Value
ItemList = shtItemId.Application.WorksheetFunction.Transpose(ItemList)
For i = 1 To UBound(ItemList)
If ItemList(i) = ItemId Then
'Set that cell as active cell???
Do
CellQuanValue = ActiveCell.Offset(0, Counter)
Me.Controls("txtQty" & Counter) = CellQuanValue
CellDesValue = ActiveCell.Offset(0, Counter+1)
Me.Controls("txtDes" & Counter) = CellDesValue
Counter = Counter + 1
'UntilNextCellIs Empty???
End If
Next i
Is there is a way to declare that cell as an active cell or an easie
way to to do this?
thank
matching itemID. Then from there I want populate a series of textboxe
located in the row with the matching itemID. The length of the row
vary and I am trying to implement my code to
read until a blank cell
here is my code so far
Dim CellQuanValue
Dim CellDesValue
Dim ItemId = some id value
Counter = 1
Dim ItemList As Variant
ItemList = shtItemId.Range("A2:A100").Value
ItemList = shtItemId.Application.WorksheetFunction.Transpose(ItemList)
For i = 1 To UBound(ItemList)
If ItemList(i) = ItemId Then
'Set that cell as active cell???
Do
CellQuanValue = ActiveCell.Offset(0, Counter)
Me.Controls("txtQty" & Counter) = CellQuanValue
CellDesValue = ActiveCell.Offset(0, Counter+1)
Me.Controls("txtDes" & Counter) = CellDesValue
Counter = Counter + 1
'UntilNextCellIs Empty???
End If
Next i
Is there is a way to declare that cell as an active cell or an easie
way to to do this?
thank