Selection.Font.ColorIndex
20.12.2007 10:22:00
serge
Wie kann ich erreichen dass die Ausgangs-Zellfarbe im Hintergrund gespeichert bleibt und auf Verlangen später zurückgegeben wird.
Ich stelle mir sowas vor:
Dim Color= Activecell.Font.ColorIndex
und später mit
With Selection.Interior
.ColorIndex = Color
.Pattern = xlSolid
End With
wiedergegeben wird
Wer hilf mir?
Danke
Serge
.........................................................................................
ActiveSheet.Unprotect
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Wahl = MsgBox("Wollen Sie im ausgewähltem Bereich " & vbCrLf & vbCrLf & " " & Selection.Address(RowAbsolute:=False, columnAbsolute:=False) & " " & vbCrLf & vbCrLf & " einen Termin löschen", vbYesNo, "Termin löschen!")
Application.ScreenUpdating = True
If Wahl = vbYes Then
ActiveSheet.Unprotect
If Selection.Columns.Count = 1 And Selection.Rows.Count = 1 Then
Selection.Interior.ColorIndex = xlNone
Selection.Font.ColorIndex = 0
Selection.ClearContents
Selection.ClearComments
Selection.UnMerge
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Exit Sub
Else
ActiveSheet.Unprotect
Selection.ClearComments
Selection.ClearContents
Selection.UnMerge