Frage:
MatthiasJ
ich habe folgenden code:
Sub Try()
Dim OutApp As Object, Mail As Object
Dim x As Integer
Dim y As Integer
Dim Nachricht
For x = 1 To Cells(65536, 5).End(xlUp).Row
For y = 1 To Cells(65536, 5).End(xlUp).Row
If Cells(x, 5) = Cells(y, 5) And Cells(x, 8) = Cells(y, 8) And Cells(x, 8) = "pending" Then
Set OutApp = CreateObject("Outlook.Application")
Set Nachricht = OutApp.CreateItem(0)
With Nachricht
.To = Cells(x, 12)
.Subject = "Pending Action Item Reminder--> " & Cells(x, 2) & "; " & Cells(y, 2)
.Body = "Please check your scheduler!" & vbCrLf & Cells(x, 3) & " ; " & Cells(y, 3)
.Display
End With
Set OutApp = Nothing
Set Nachricht = Nothing
Application.Wait (Now + TimeValue("0:00:05"))
End If
Next y
Next x
End Sub
Bei dieser Zeile:
"If Cells(x, 5) = Cells(y, 5) And Cells(x, 8) = Cells(y, 8) And Cells(x, 8) = "pending" Then"
Wie kann man es da machen, dass die beiden variablen x und y zur gleichen zeit immer unterschiedlich sind?
Weiß das wer?
MFG
Matthias