programing

VBA를 사용하여 Excel 2007에서 셀을 투명하게 만드는 방법

lastcode 2023. 7. 1. 08:46
반응형

VBA를 사용하여 Excel 2007에서 셀을 투명하게 만드는 방법

현재 다음을 보유하고 있습니다.

Range("Z1").Interior.Color = RGB(255, 255, 255)

하지만 이것은 세포의 경계를 지워버립니다.대신 범위 내 셀의 투명도를 1.0으로 설정하고 싶습니다.문서에 따르면 존재하지 않는 것으로 보입니다(?).

감사합니다!

Range("Z1").Interior.ColorIndex = xlNone

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    Application.ScreenUpdating = False
    ' Clear the color of all the cells
    Cells.Interior.ColorIndex = 0
    With Target
        ' Highlight the entire row and column that contain the active cell
        .EntireRow.Interior.ColorIndex = 8
        .EntireColumn.Interior.ColorIndex = 8
    End With
    Application.ScreenUpdating = True
End Sub

아마도 간단한 접근법은(Symbol).(line or background)Color = -1 'Transparent.

언급URL : https://stackoverflow.com/questions/9116057/how-to-use-vba-to-make-a-cell-in-excel-2007-transparent

반응형