• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to set font properties to an entire workbook?

Hi Hamish

To do this quickly. Click on the left most sheet. Now hold shift and click on the right most sheet. All sheets should appear White.

Now Press Ctrl A. Choose the font colour you want.

All sheets will show the font colour you just chose.

Take care

Smallman
 
Hi Hamish

For a Vb solution something like this should see you over the line.

Code:
Sub ColourMeBad()
Dim ws As Worksheet
 
    For Each ws In Sheets
        ws.Cells.Font.ColorIndex = xlAutomatic
    Next ws
End Sub

Take care

Smallman
 
Hi Smallman,

The code is returning error: "subscript out of range"

Is there another way I can refer to the workbook/worksheets?
 
Hamish

Do you have hidden worksheets? Do you have merged cells? I am just guessing here.

How about you open a fresh workbook and run my coding. It runs well on a test workbook. Now all you have to decide is what is different from your workbook to the test one. If you can not figure out the difference post your workbook.

Take care

Smallman
 
Hi Hamish

Thanks for posting back with your feedback. Now anyone following the thread with the same issue will have to tools to solve the problem.

Take care

Smallman
 
Back
Top