Macro > white font

bluepenink

Well-known Member
Joined
Dec 21, 2010
Messages
585
Hello

How can i define with the macro below to show "white font" for the specified range?

Code:
            With Range("C3:O3")
                With .Interior
                    .Pattern = xlSolid
                    .PatternColorIndex = xlAutomatic
                    .Color = 10027008
                End With
 
                .BorderAround LineStyle:=xlContinuous, _
                              ColorIndex:=0, _
                              Weight:=xlThin
                .Font.Bold = True
            End With
        End If
    End With
 
    Application.ScreenUpdating = True
End Sub

obv i have chunked out some coding...thx u guys!
 
Last edited:

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Code:
With Range("C3:O3")
    .Font.Color = vbWhite
 
Upvote 0
Code:
With Range("C3:O3")
    .Font.Color = vbWhite

getting an error when i execute the following code

Code:
            With Range("C3:O3")
                With .Interior
                    .Pattern = xlSolid
                    .PatternColorIndex = xlAutomatic
                    .Color = 10027008
                    .Font.Color = vbWhite
                End With
 
                .BorderAround LineStyle:=xlContinuous, _
                              ColorIndex:=0, _
                              Weight:=xlThin
                .Font.Bold = True
            End With
        End If
    End With

help!
 
Upvote 0
It's a property of the Range object, not the Interior object. Back it up above With .Interior, or move it down next to .Font.Bold.
 
Upvote 0

Forum statistics

Threads
1,224,613
Messages
6,179,896
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top