Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Underline portion of footer with VBA

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,489
Default Underline portion of footer with VBA

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
  #3   Report Post  
Posted to microsoft.public.excel.misc
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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Underline portion of footer with VBA

One further thing. Is there any way to get a character return in the footer
using VBA??? Or enter a second line of text??

"LandesMD" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,489
Default Underline portion of footer with VBA

activesheet.pagesetup.centerfooter = "Hello" & vblf & "Today"


LandesMD wrote:
One further thing. Is there any way to get a character return in the footer
using VBA??? Or enter a second line of text??

"LandesMD" wrote:


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


--

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


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Underline portion of footer with VBA

Perfect, I would never have found that! From the help file it looks as
though that could be useful elseware...

Thanks
LandesMD

"Andy Pope" wrote:

activesheet.pagesetup.centerfooter = "Hello" & vblf & "Today"


LandesMD wrote:
One further thing. Is there any way to get a character return in the footer
using VBA??? Or enter a second line of text??

"LandesMD" wrote:

etc...

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Double accounting underline Jessee New Users to Excel 1 May 8th 06 06:23 AM
Custom Footer for each page NAVEEN Excel Worksheet Functions 0 February 21st 06 11:04 AM
header and footer problems cliffhanger79 Charts and Charting in Excel 4 November 7th 05 08:03 PM
Inserting Footer - Ajit Ajit Munj Excel Discussion (Misc queries) 2 March 11th 05 02:39 PM
Formatting a footer with a top border-line Ed Isenberg Excel Discussion (Misc queries) 3 December 19th 04 10:41 PM


All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"