Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Double accounting underline | New Users to Excel | |||
Custom Footer for each page | Excel Worksheet Functions | |||
header and footer problems | Charts and Charting in Excel | |||
Inserting Footer - Ajit | Excel Discussion (Misc queries) | |||
Formatting a footer with a top border-line | Excel Discussion (Misc queries) |