M
Minitman
Greetings,
I have three nested ComboBoxes which are working (Thanks to Norman
Jones).
The second half of my problem is to use these three ComboBoxes as
criteria to get the data from the next two columns and place it into
two TextBoxes(TB5 & TB6) on my UserForm.
The code I have been fighting with is giving me a type mismatch error!
Here is that code:
For Each c In Range("ReceiptList")
If CB1.Value = Range("ReceiptList").Offset(0, 1).Value And _
CB2.Value = Range("ReceiptList").Offset(0, 2).Value _
And CB3.Value = Range("ReceiptList").Offset(0, 3) _
Value Then
TB5.Value = Range("ReceiptList").Offset(0, 4).Value
TB6.Value = Range("ReceiptList").Offset(0, 5).Value
Exit Sub
End If
Next c
CB1, CB2 & CB3 are ComboBoxes and TB5 & TB6 are TextBoxes all 5 are on
a UserForm. Range "ReceiptList" is on a Sheet called "Data". It
contains all 5 columns. CB1 gets it's Rowsource from column A, CB2
gets it's RowSource from column B and CB3 gets it's RowSource from
column C, TB5 is looking for the matching row in column D and TB6 is
looking for in column E.
I have a sample workbook that I have been working with if anyone would
like to see it.
Any help or suggestions are welcome.
-Minitman
I have three nested ComboBoxes which are working (Thanks to Norman
Jones).
The second half of my problem is to use these three ComboBoxes as
criteria to get the data from the next two columns and place it into
two TextBoxes(TB5 & TB6) on my UserForm.
The code I have been fighting with is giving me a type mismatch error!
Here is that code:
For Each c In Range("ReceiptList")
If CB1.Value = Range("ReceiptList").Offset(0, 1).Value And _
CB2.Value = Range("ReceiptList").Offset(0, 2).Value _
And CB3.Value = Range("ReceiptList").Offset(0, 3) _
Value Then
TB5.Value = Range("ReceiptList").Offset(0, 4).Value
TB6.Value = Range("ReceiptList").Offset(0, 5).Value
Exit Sub
End If
Next c
CB1, CB2 & CB3 are ComboBoxes and TB5 & TB6 are TextBoxes all 5 are on
a UserForm. Range "ReceiptList" is on a Sheet called "Data". It
contains all 5 columns. CB1 gets it's Rowsource from column A, CB2
gets it's RowSource from column B and CB3 gets it's RowSource from
column C, TB5 is looking for the matching row in column D and TB6 is
looking for in column E.
I have a sample workbook that I have been working with if anyone would
like to see it.
Any help or suggestions are welcome.
-Minitman