Header in bold VBA

callamhall

New Member
Joined
Oct 30, 2017
Messages
2
Hi,

I am currently trying to create a VBA to show a cell value in the center header in bold, I have got the cell value to show in the header but I am unable to get this to go bold and font size 14?
I have tried a few methods but none have worked?
Code I use is below:

Code:
Sub HeaderFromB19()
ActiveSheet.PageSetup.CenterHeader = Range("B18").Value
End Sub
Thanks
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi, and welcome to Mr. Excel!

This works:
Code:
Sub HeaderFromB19()
ActiveSheet.PageSetup.CenterHeader = "&B&14" &Range("B18").Value
End Sub
 
Last edited:
Upvote 0
Pleasure. Glad it worked for you, and thanks for feeding back that it worked; this is so useful for others with the same question as yours, when they're looking for answers - to know which solutions worked.

This is such a good site for all things Excel.

All the best.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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