folgendes funktioniert nicht....weißt nicht wie ich es sonst lösen könnte!
Über jegliche Hilfe + Erklärung würde ich mich sehr freuen =)
will einem Bereich in einem Sheet einfach nur bestimmte werte aus anderen sheets einfügen.
schon mal eingefügte Werte sollen nicht nochmal eingefügt werden!
hier mal der code:
ich denke das fettgedruckte ist mein kleines problem...
lg
adrian
Private Sub Worksheet_Activate()
Dim ODMZ As Integer, i As Integer
ODMZ = Worksheets("Philips (A)").Range("SupplierAs").Cells.Count
ODMZ = ODMZ + Worksheets("Philips (EU)").Range("SupplierEU").Cells.Count
ODMZ = ODMZ + Worksheets("Philips (US)").Range("SupplierUS").Cells.Count
ReDim tempVar(0 To ODMZ, 0)
i = 0
With Range("ODMList")
For Each Cell In Worksheets("Philips (A)").Range("SupplierAs")
If Cell "" Then
If IsNumeric(Application.Match(Cell, tempVar, 0)) = False Then
tempVar(i, 0) = Cell.Value
.AddItem Cell.Value
i = i + 1
End If
End If
Next
For Each Cell In Worksheets("Philips (EU)").Range("SupplierEU")
If Cell "" Then
If IsNumeric(Application.Match(Cell, tempVar, 0)) = False Then
tempVar(i, 0) = Cell.Value
.AddItem Cell.Value
i = i + 1
End If
End If
Next
For Each Cell In Worksheets("Philips (US)").Range("SupplierUS")
If Cell "" Then
If IsNumeric(Application.Match(Cell, tempVar, 0)) = False Then
tempVar(i, 0) = Cell.Value
.AddItem Cell.Value
i = i + 1
End If
End If
Next
End With
End Sub