Adding a second line in a header or footer through VBA

  • Thread starter Thread starter Montana
  • Start date Start date
Press ENTER after the first part

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| How do I add a second line in a footer using RightFooter?
| --
| Peace
 
Sorry, forgot you want a VBA solution (which you have now)

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Press ENTER after the first part
|
| --
| Kind regards,
|
| Niek Otten
| Microsoft MVP - Excel
|
|| How do I add a second line in a footer using RightFooter?
|| --
|| Peace
|
|
 
JLGWhiz: Where does this code co in the line to be typed? e.g.,
..CenterFooter = "xxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxx"
 
It goes where you want the line feed to occur:

Sheets(1).PageSetup.CenterFooter = "&"Arial" &B &12 &"mytext" _
& vbCrLf & "more mytext" & vbCrLf & "more mytext"

Would give you three lines of text in Bold Arial type.
 

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

Back
Top