Changing Excel Header font size through Access-TJ

A

ambushsinger

I have an Access application that produces and Excel report from a template
that I've designed. The line below is used to create a header for this excel
report, but I need to be able to change the font size .
"Current Data month" is text...sMonth1 is the current month of the
data...etc...

any ideas?

..PageSetup.RightHeader = "Current Data Month = " & sMonth1 & " " & iYear1

TJ
 
T

terri

I declare variables for the font name and text and use this syntax (just
substitute the number (14) with whatever font size you want):

strFont = "Arial"
strText = "Current Data Month = " & sMonth1 & " " & iYear1

.PageSetup.RightHeader = "&""" & strFont & ",Regular""&14 " & strText
 
A

ambushsinger

Terri...THANK YOU!!!!
worked like a charm.

Tom

terri said:
I declare variables for the font name and text and use this syntax (just
substitute the number (14) with whatever font size you want):

strFont = "Arial"
strText = "Current Data Month = " & sMonth1 & " " & iYear1

.PageSetup.RightHeader = "&""" & strFont & ",Regular""&14 " & strText
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top