Search code examples
excelvbacolorsbackground-color

Set all sheets' fill color to "No Fill" using VBA in excel


How can I Set all sheets fill color to No fill using VBA in excel (all cells). Same as select all sheets, Select all cells (Control+A) and change fill color to No fill.


Solution

  • Untested but should do the job:

    Sub No_Fill_Wb()
    
    Dim ws as worksheet
    
    For each ws in Thisworkbook.Worksheets
        ws.Cells.Interior.ColorIndex = 0
    Next ws
    
    End Sub