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
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,278
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")
 

Watch MrExcel Video

Forum statistics

Threads
1,109,544
Messages
5,529,457
Members
409,879
Latest member
Aussie_Excel_Wanna_Be
Top