AW: Kann mir keiner helfen ? ;-( oT
14.05.2004 11:23:19
Andreas
Sorry, der kann das Programm nicht hochladen,er schreibt immer ...
Kein Upload möglich
Grund: Ungültiger Dateiname
Erlaubte Dateiformate: gif, jpg
Aber das ist mein Code, die If-Bedingung funktioniert nicht, Vb sagt Typen sind unverträglich. Ich möchte nur das nicht eine Datenreihe 2 mal in ein anderes Tab.blatt kopiert wird, deswegen soll er vorher überprüfen, ob diese schon vorhanden ist.
Super vielen Dank das Du mir hilfst!!!!! ;-)
Private Sub CommandButton2_Click()
Dim i As Long, n As Long
Cells.Interior.ColorIndex = xlNone
n = 1
For i = 4 To 103
Select Case Sheets("UG").Cells(i, 5).Value
Case Is = Date
If Sheets("UG").Rows(i) = Sheets("Dringende Termine").Rows(i) Then
iMsgresz = MsgBox("Einige Termine sind immer noch aktuell!", vbOK, "Fertig")
Else
Do
n = n + 1
Loop Until IsEmpty(Sheets("Dringende Termine").Cells(n, 5))
Rows(i).Copy Destination:=Sheets("Dringende Termine").Cells(n, 1)
Rows(i).Font.ColorIndex = 3
Rows(i).Font.Size = 12
Rows(i).Font.Bold = True
End If
Case Is = Date + 1
Do
n = n + 1
Loop Until IsEmpty(Sheets("dringende Termine").Cells(n, 5))
Rows(i).Copy Destination:=Sheets("Dringende Termine").Cells(n, 1)
Rows(i).Font.ColorIndex = 3
Rows(i).Font.Size = 12
Rows(i).Font.Bold = True
Case Is = Date + 2
Do
n = n + 1
Loop Until IsEmpty(Sheets("dringende Termine").Cells(n, 5))
Rows(i).Copy Destination:=Sheets("Dringende Termine").Cells(n, 1)
Rows(i).Font.ColorIndex = 3
Rows(i).Font.Size = 12
Rows(i).Font.Bold = True
End Select
Next i
End Sub