LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.charting
Stacey
 
Posts: n/a
Default Need to format text in header, but value is generated using VBA

Hello,

I wanted to reference a cell value in my spreadsheet header and found out how to do that using this function:

Private Sub Workbook_BeforePrint(Cancel As Boolean)

Dim WS As Worksheet
For Each WS In Worksheets
ActiveSheet.PageSetup.RightHeader = _
Format(Worksheets("Time Period Info").Range("B3").Value)

Next WS
End Sub


However, this leaves my text for this portion of the header at Arial Size 10 font Regular. I would like it Arial Size 20 Bold. How can I set it to this format of text?

Thanks for the help!

--Stacey
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing cell format - for example text to numeric sjrku Excel Discussion (Misc queries) 3 December 30th 05 10:40 PM
Custom Number Format Text Frank & Pam Hayes Excel Discussion (Misc queries) 3 December 3rd 05 05:36 PM
How do I set Excel cell format to "Text" from VB.NET? John Brock Excel Discussion (Misc queries) 8 July 26th 05 04:36 AM
format the "date" button for a header sc11 Excel Discussion (Misc queries) 1 May 12th 05 03:48 AM
Problem with wrap text format Mitch Excel Worksheet Functions 1 January 20th 05 09:46 AM


All times are GMT +1. The time now is 01:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"