How to use VBA to make a cell in Excel 2007 transparent

前端 未结 3 568
天命终不由人
天命终不由人 2021-01-17 09:52

I currently have:

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

But this wipes out the borders of the cells. Instead I\'d just like to

相关标签:
3条回答
  • 2021-01-17 10:17
    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
    
    0 讨论(0)
  • 2021-01-17 10:18

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

    0 讨论(0)
  • 2021-01-17 10:29

    Perhaps a simple approach would be (Symbol).(line or background)Color = -1 'Transparent.

    0 讨论(0)
提交回复
热议问题