I can loop through all 10 ComboBoxes with the following code.
Code:
Dim cmb As combobox, i As Integer
For i = 1 To 10
Set cmb = Me.Controls.Item("ComboBox" & i)
MyPNum = cmb.Value
Cells.Find(What:=MyPNum, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False).Activate
[Code/]
When I try to add the TextBox 1-10 nothing I do works. I've tried :
Dim pqty As textbox, i As Integer
Dim pqty As textbox, i
and
Dim pqty As textbox
All but the last got errors.
Using the last Dim with:
Set pqty = Me.Controls.Item("TextBox" & i)
I get errors on the Set statement.
I use the partnumber in the comboboxes to find the row listing that part number, then want to place the quantity of the part ordered in the "Order Qty" column, then loop back for the next part number.
Rob