hi
in earlier Mr. Dante solve my thread in this link match data based on three combobox & three columns and populate values into textbox
now I want updating the code but not populate the values after match . what I want if the value in textbox1,2 after fill manually is bigger than the values in COL D then should show message 'the qty is exceeded , the qty is... please try again"
and if the value smaller then should copy to the sheet to the bottom
in earlier Mr. Dante solve my thread in this link match data based on three combobox & three columns and populate values into textbox
now I want updating the code but not populate the values after match . what I want if the value in textbox1,2 after fill manually is bigger than the values in COL D then should show message 'the qty is exceeded , the qty is... please try again"
and if the value smaller then should copy to the sheet to the bottom
VBA Code:
Private Sub CommandButton1_Click()
Dim a As Variant
Dim i As Long
TextBox1 = ""
TextBox2 = ""
a = Sheets("list").Range("A2", Sheets("list").Range("D" & Rows.Count).End(3)).Value
For i = 1 To UBound(a)
If a(i, 1) = ComboBox1 And a(i, 2) = ComboBox2 And a(i, 3) = ComboBox3 Then TextBox1 = a(i, 4)
If a(i, 1) = ComboBox4 And a(i, 2) = ComboBox5 And a(i, 3) = ComboBox6 Then TextBox2 = a(i, 4)
Next
If TextBox1 = "" Then MsgBox "For textbox1. The items are not matched, please try again"
If TextBox2 = "" Then MsgBox "For textbox2. The items are not matched, please try again"
End Sub