Hi, The issue I am having is textbox1 (Top Label Code) finds the exact match from column A but there is more than one so it matches the first one in column A, how could I do it so it matches column A and column G?
As you can see from the image below I selected product code 8696 but it put the data in 8691 the first match in column A from textbox1 (Top Label Code).
I have tried to change the match to ComboBox3 (Product Code) column G but it shows an error, how could I do it so it matches column A and column G or just column G.
Hope that made some sense.☺
ComboBox8 is (QTY)
As you can see from the image below I selected product code 8696 but it put the data in 8691 the first match in column A from textbox1 (Top Label Code).
I have tried to change the match to ComboBox3 (Product Code) column G but it shows an error, how could I do it so it matches column A and column G or just column G.
Hope that made some sense.☺
ComboBox8 is (QTY)
VBA Code:
Private Sub ComboBox8_AfterUpdate()
Dim m As Variant
With ThisWorkbook.Worksheets("ALL")
m = WorksheetFunction.Match(TextBox1.Text, .Columns(1), 0)
If ComboBox1.Value = "OUT" Then
With .Cells(CLng(m), "I")
.Value = ""
.Value = .Value + ComboBox2.Value
End With
With .Cells(CLng(m), "J")
.Value = .Value + ComboBox8.Value
End With
sl1.Show
ElseIf ComboBox1.Value = "IN" Then
With .Cells(CLng(m), "I")
.Value = ""
End With
With .Cells(CLng(m), "J")
.Value = .Value - ComboBox8.Value
sl1.Show
End With
End If
End With
End Sub