Hi,
Can anyone help with the code below I keep getting a type mismatch error on the line highlighted in red and I don't know why.
Can anyone help with the code below I keep getting a type mismatch error on the line highlighted in red and I don't know why.
Rich (BB code):
Private Sub textbox17_Change()
Dim m As Variant
With ThisWorkbook.Worksheets("Data")
m = WorksheetFunction.Match(TextBox1.Text, .Columns(1), 0)
If ComboBox1.Value = "OUT" Then
With .Cells(CLng(m), "C")
.Value = .Value + ComboBox5.Value
End With
ElseIf ComboBox1.Value = "IN" Then
With .Cells(CLng(m), "C")
.Value = .Value - ComboBox5.Value
If ComboBox1.Value = "OUT" Then
With .Cells(CLng(m), "D")
.Value = .Value + ComboBox7.Value
End With
ElseIf ComboBox1.Value = "IN" Then
With .Cells(CLng(m), "D")
.Value = .Value - ComboBox7.Value
End With
End If
End With
End If
End With
End Sub