Trouble using VB to bold & change font size on a declared range in right page header in XL2013

flmoeron

New Member
Joined
Oct 10, 2014
Messages
2
Using the following code to populate a header via a ribbon button push:

If Not wstInfo.Range("B7") = "" Then strCST = wstInfo.Range("B7") & ", " & wstInfo.Range("B8")

wstScope.PageSetup.RightHeader = Format(wstInfo.Range("B3"), "mmmm d, yyyy") & vbCr & vbCr & _
wstInfo.Range("B4") & vbCr & wstInfo.Range("B6") & vbCr & _
strCST & vbCr & "&B Proposal #: " & wstInfo.Range("B9")

The result looks like this with the declared ranges coming from another tab in the same workbook:

October 10, 2014

Takanka/Honda
Assembly Line Belt
Indianapolis, IN
Proposal #: 0001234

I'm looking to BOLD and change the font size for the wstInfo.Range("B4") value similar to the Proposal line.

Appreciate any and all direction/help on a direction/solution to this...

Thanks in advance!

Brian
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
11 is the bolded font size
10 returns to the regular font size

Code:
wstScope.PageSetup.RightHeader = Format(wstInfo.Range("B3"), "mmmm d, yyyy") & vbCr & vbCr & _
    [COLOR=#ff0000]"&""Arial,Bold""&[/COLOR][COLOR=#0000ff]11[/COLOR][COLOR=#ff0000]" & wstInfo.Range("B4") & "&""Arial,Regular""&[/COLOR][COLOR=#0000ff]10[/COLOR][COLOR=#ff0000]"[/COLOR] & _
    vbCr & wstInfo.Range("B6") & vbCr & _
    strCST & vbCr & "&B Proposal #: " & wstInfo.Range("B9")
 
Upvote 0

Forum statistics

Threads
1,215,002
Messages
6,122,652
Members
449,092
Latest member
peppernaut

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