Schriftart ändern
29.05.2008 14:27:00
gp
Hallo Renée,
mit Deiner Lösung passiert das gleiche wie bei Erich's. Ich habe den verdacht, das da am Rest von meinem Skript irgend etwas faul ist. Vollständig schaut das Ganze so aus:
Option Explicit
Private Sub Worksheet_Deactivate()
Application.ScreenUpdating = False
Dim varZ As Variant, lngZ As Long, zz As Long, strTxt As String
Dim KeyCount As Integer, t As Integer, i As Integer
varZ = Application.Match(CDbl(Date), Columns(1), 0)
If IsError(varZ) Then
MsgBox "Heutiges Datum nicht gefunden - Abbruch"
Exit Sub
Else
lngZ = CLng(varZ)
End If
For zz = lngZ To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(zz, 1) = Date Then
varZ = zz
If strTxt > "" Then strTxt = strTxt & "; "
strTxt = strTxt & "VT " & Cells(zz, 9) & ": " & Cells(zz, 3)
End If
Next zz
Tabelle3.Cells(20, 10) = strTxt
For KeyCount = 1 To Len(Cells(20, 10).Value)
If Mid(Cells(20, 10), KeyCount, 2) = "VT" Then
Cells(20, 10).Characters(Start:=KeyCount, Length:=2).Font.Bold = True
End If
Next KeyCount
For zz = lngZ To Cells(Rows.Count, 1).End(xlUp).Row
If Cells(zz, 1) = Date And Cells(zz, 8) > "" Then
varZ = zz
If strTxt > "" Then i = i + 1
strTxt = i
End If
Next zz
Tabelle3.Cells(42, 4) = strTxt
End Sub
Ich hoffe das ist nicht zu viel. Aber irgendwie macht mich das verrückt, dass das nicht funktionieren will
Gruss
Gunter