ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formatting footer in VBA code (https://www.excelbanter.com/excel-discussion-misc-queries/30142-formatting-footer-vba-code.html)

Frantic Excel-er

Formatting footer in VBA code
 
Hi all....

I have this bit of code in a macro that I would like formatted, but I do not
know how....the code is to automatically insert the file path and the tab
name of a spreadheet....I would like to format the code, so that every time
it opens a document it will make the font Arial size 8. What I have now only
makes the "&A" (which is the tab) size 8......

Here is the string....
.CenterFooter = ActiveWorkbook.FullName & Chr(10) & "&""Arial""&8&A"

Any suggestions would be great!!!!!!!!!!!!

Jason Morin

I'm not sure I follow entirely, but this will give you the full path and
sheet name, *all* in Arial and 8 point font:

..CenterHeader = "&8" & "&""Arial""" & ActiveWorkbook.FullName & " &A"

HTH
Jason
Atlanta, GA

"Frantic Excel-er" wrote:

Hi all....

I have this bit of code in a macro that I would like formatted, but I do not
know how....the code is to automatically insert the file path and the tab
name of a spreadheet....I would like to format the code, so that every time
it opens a document it will make the font Arial size 8. What I have now only
makes the "&A" (which is the tab) size 8......

Here is the string....
.CenterFooter = ActiveWorkbook.FullName & Chr(10) & "&""Arial""&8&A"

Any suggestions would be great!!!!!!!!!!!!


Frantic Excel-er

Thank you so very much...I thought I tried that , but obviously, I had
something wrong....it is very helpful......Thanks again!!!!!!!!!!!!!

"Jason Morin" wrote:

I'm not sure I follow entirely, but this will give you the full path and
sheet name, *all* in Arial and 8 point font:

.CenterHeader = "&8" & "&""Arial""" & ActiveWorkbook.FullName & " &A"

HTH
Jason
Atlanta, GA

"Frantic Excel-er" wrote:

Hi all....

I have this bit of code in a macro that I would like formatted, but I do not
know how....the code is to automatically insert the file path and the tab
name of a spreadheet....I would like to format the code, so that every time
it opens a document it will make the font Arial size 8. What I have now only
makes the "&A" (which is the tab) size 8......

Here is the string....
.CenterFooter = ActiveWorkbook.FullName & Chr(10) & "&""Arial""&8&A"

Any suggestions would be great!!!!!!!!!!!!



All times are GMT +1. The time now is 08:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com