bin ein ziemlicher anfänger desshalb bitte ich um nachsicht.
ich hab eine funktion in vba die aber nicht richtig ist.
im grunde soll sie dass gleiche machen wie eine
=wenn(and(x;x)=x;x;x) Funktion in Excel, Code sie sieht bissher so aus:
If ComboBox2 = "ändern" Then
Sheets("Baugruppe").Select
letzteZeile = ActiveSheet.UsedRange.Rows.Count
For j = 1 To letzteZeile
Cells.Find(What:=ComboBox1, After:=A1, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False).Activate
if ActiveCell = ComboBox1 and_
ActiveCell.Offset(0, 1) = ComboBox1.List(ComboBox1.ListIndex, 1) and_
ActiveCell.Offset(0, 2) = TextBox1 and_
ActiveCell.Offset(0, 3) = TextBox2 and_
ActiveCell.Offset(0, 4) = TextBox3 and_
ActiveCell.Offset(0, 5) = TextBox4 and_
ActiveCell.Offset(0, 6) = TextBox5 and_
ActiveCell.Offset(0, 7) = TextBox6 and_
ActiveCell.Offset(0, 8) = TextBox7 and_
ActiveCell.Offset(0, 9) = TextBox8 and_
ActiveCell.Offset(0, 10) = TextBox9 and_
ActiveCell.Offset(0, 11) = TextBox10 and_
ActiveCell.Offset(0, 12) = TextBox11 and_
ActiveCell.Offset(0, 13) = TextBox12 and_
ActiveCell.Offset(0, 14) = TextBox13 and_
ActiveCell.Offset(0, 15) = TextBox14 and_
ActiveCell.Offset(0, 16) = TextBox15 and_
ActiveCell.Offset(0, 17) = TextBox16 and_
ActiveCell.Offset(0, 18) = TextBox17 and_
ActiveCell.Offset(0, 19) = TextBox18 and_
ActiveCell.Offset(0, 20) = TextBox19 and_
ActiveCell.Offset(0, 21) = TextBox20 and_
ActiveCell.Offset(0, 22) = TextBox21 and_
ActiveCell.Offset(0, 23) = TextBox22 and_
ActiveCell.Offset(0, 24) = TextBox23 and_
ActiveCell.Offset(0, 25) = TextBox24 and_
ActiveCell.Offset(0, 26) = TextBox25 and_
ActiveCell.Offset(0, 27) = TextBox26 and_
ActiveCell.Offset(0, 28) = TextBox27 and then Activecell.Select
Else
Next j
Dieser Code soll prüfen ob sich die markierte zelle an der richtigen stelle befindet, dass mit den "and" stimmt aber so nicht weiß jemand warum?
Gruß
Hans