Link to home
Start Free TrialLog in
Avatar of Flora Edwards
Flora EdwardsFlag for Sweden

asked on

VBA to clear/put no-fill the cells background color for all sheets of active workbook

i have received a mess, so many entire rows and entire columns background colored and text colored.

i need help with VBA that restores all of the cells background colors and font to the default. by default i mean when u open a new workbook obviously cells has no background color and the text you type is black color.

thanks.
SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Correcting Neeraj's Code:
Sub DefaultInteriorAndCellColor()
Dim ws As Worksheet

For Each ws In Worksheets
    ws.Cells.Interior.ColorIndex = xlNone
    ws.Cells.Font.FontStyle = xlNone
Next ws
End Sub

Open in new window

Avatar of Flora Edwards

ASKER

thanks.