?
Solved

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

Posted on 2003-03-25
6
Medium Priority
?
239 Views
Last Modified: 2008-03-06
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
0
Comment
Question by:TheCoyote
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Accepted Solution

by:
pauloaguia earned 300 total points
ID: 8205722
ThisWorkbook.Worksheets("blablabla").PageSetup.RightFooter = "blablabla"
 & vbLf & "&D"

You can find this by recording a macro of you doing so and then looking at the result.

Hope this helps

Paulo
0
 
LVL 9

Expert Comment

by:pauloaguia
ID: 8205747
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
0
 
LVL 44

Expert Comment

by:bruintje
ID: 8205762
Hello TheCoyote,

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

HAGD:O)Bruintje
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:TheCoyote
ID: 8205787
WoW!!! you guys (or girls... =P ) are Fast Thank you very much!!

Hugo
0
 

Author Comment

by:TheCoyote
ID: 8205802
Thank you for the fast answer it saves us lots of trouble!
Have a nice day!

Hugo
0
 
LVL 9

Expert Comment

by:pauloaguia
ID: 8205978
(We're guys).
Thanks for the points :)
And welcome to EE.
0

Featured Post

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a serious pitfall that can happen when deleting shapes using VBA.
New style of hardware planning for Microsoft Exchange server.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question