View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
LandesMD LandesMD is offline
external usenet poster
 
Posts: 4
Default Underline portion of footer with VBA

Thanks a million!! That's exactly what I was looking for, I also wanted to
bold the font, now I know how "and knowing is half the battle"!

LandesMD

"Andy Pope" wrote:

Hi,

Use &U to get underlining toggled on and off.

Modified by: &U[Name]&U

And here from the help file are the other formatting codes.
Format code Description
&L Left aligns the characters that follow.
&C Centers the characters that follow.
&R Right aligns the characters that follow.
&E Turns double-underline printing on or off.
&X Turns superscript printing on or off.
&Y Turns subscript printing on or off.
&B Turns bold printing on or off.
&I Turns italic printing on or off.
&U Turns underline printing on or off.
&S Turns strikethrough printing on or off.
&D Prints the current date.
&T Prints the current time.
&F Prints the name of the document.
&A Prints the name of the workbook tab.
&P Prints the page number.
&P+number Prints the page number plus the specified number.
&P-number Prints the page number minus the specified number.
&& Prints a single ampersand.
& "fontname" Prints the characters that follow in the specified font. Be
sure to include the double quotation marks.
&nn Prints the characters that follow in the specified font size. Use a
two-digit number to specify a size in points.
&N Prints the total number of pages in the document.

Cheers
Andy

LandesMD wrote:
I would like to have a user enter their name and then display "Modified by:
[Name]" and have the name portion underlined. I know how to use VBA to enter
the footer, but how do I underline a portion of it?

Thanks
LandesMD


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info