Hirdetés

Új hozzászólás Aktív témák

  • Delila_1

    veterán

    válasz Swen_N #8752 üzenetére

    Itt egy másik megoldás, nem én követtem el, csak átvettem. A laphoz kell rendelni (lapfülön jobb klikk, Kód megjelenítése. Ezzel bejutottál a VB szerkesztőbe, a jobb oldalon kapott üres lapra kell bemásolni. A cellára lépve megkapod a "célkereszt"-et.

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Cells.FormatConditions.Delete
    With Target
    With .EntireRow
    .FormatConditions.Add Type:=xlExpression, Formula1:="1"
    With .FormatConditions(1)
    With .Borders(xlTop)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    With .Borders(xlBottom)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    .Interior.ColorIndex = 20
    End With
    End With
    With .EntireColumn
    .FormatConditions.Delete
    .FormatConditions.Add Type:=xlExpression, Formula1:="1"
    With .FormatConditions(1)
    With .Borders(xlLeft)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    With .Borders(xlRight)
    .LineStyle = xlContinuous
    .Weight = xlThin
    .ColorIndex = 5
    End With
    .Interior.ColorIndex = 20
    End With
    End With

    .FormatConditions.Delete
    .FormatConditions.Add Type:=xlExpression, Formula1:="1"
    .FormatConditions(1).Interior.ColorIndex = 36
    End With
    End Sub

Új hozzászólás Aktív témák