Ich möchte eine Zeile Anhand eines Wortes in einer Combobox (TextBox_caption) finden. In diese Zeile möchte ich dann Werte eintragen. Ich habe versucht es hinzubekommen, hat aber nicht geklappt.
Mit dem hab ichs versucht:
Dim last As Integer, last1 As Integer
last1 = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Row + 1
If ActiveSheet.Columns(1).Find(what:=Range("A1").Value, LookIn:=xlValues, lookat:=xlWhole, searchdirection:=xlNext).Row = NewProduct.TextBox_caption.Value Then
If MsgBox("Produktname schon verwendet, überschreiben? (AA1)", vbOKCancel) = vbOK Then
last = ActiveSheet.Columns(1).Find(what:=Range("A1").Value, LookIn:=xlValues, lookat:=xlWhole, searchdirection:=xlNext).Row
Else
Exit Sub
End If
Else
last = last1
End If
Weiter gehts dann ungefähr so:
ActiveSheet.Cells(last, 11).Value = NewProduct.ComboBox1_category.Value
ActiveSheet.Cells(last, 12).Value = NewProduct.ComboBox_basiccategory.Value