Link to home
Start Free TrialLog in
Avatar of TheCoyote
TheCoyote

asked on

Changing lines in the footer of Excel by VBA ???

I want to add a line to my footer in Excel... We try every commend we knew to change a line and we don't know what can make office change the line... Help me plz!

Here is the line i'm using...

ThisWorkbook.Worksheets("blablabla").PageSetup.RightFooter = "blablabla"

and i would like to add like the date on a different line in the Right footer. What is the command to make excel change line in the footer... We tryed directly in the page setup in the file menu but the character they put in is a little square but i don't know what this square refers to!?!

Thank you for your Help!

Hugo
ASKER CERTIFIED SOLUTION
Avatar of pauloaguia
pauloaguia
Flag of Portugal image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, vbLf is a constant that represents the Line Feed (newline) character. That's why this code produces a new line.

vbCr (carriage return) and vbCrLf have similar meanings although there are some differences between them.

Paulo
Hello TheCoyote,

not sure but you could try
ThisWorkbook.Worksheets("blablabla").PageSetup.RightFooter = "blablabla" & chr(13) & chr(10) & "blahblahblah2"

HAGD:O)Bruintje
Avatar of TheCoyote
TheCoyote

ASKER

WoW!!! you guys (or girls... =P ) are Fast Thank you very much!!

Hugo
Thank you for the fast answer it saves us lots of trouble!
Have a nice day!

Hugo
(We're guys).
Thanks for the points :)
And welcome to EE.