Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Programming footer

The following code will programmatically add the user's name as well as date
and time to the right footer as well as setting the fonts of both lines in
the footer.

ActiveSheet.PageSetup.RightFooter = _
"&""Brush Script mt,italic""&14" & Application.UserName & _
Chr(10) & "&""Times New Roman""&8" & "&D &T"

How do I get it to underline the user name? (only the user name)

--
D.S.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Programming footer

Hi
AFAIK you can't achieve this as you can set the font style only for the
complete fotter text

"Donald" wrote:

The following code will programmatically add the user's name as well as date
and time to the right footer as well as setting the fonts of both lines in
the footer.

ActiveSheet.PageSetup.RightFooter = _
"&""Brush Script mt,italic""&14" & Application.UserName & _
Chr(10) & "&""Times New Roman""&8" & "&D &T"

How do I get it to underline the user name? (only the user name)

--
D.S.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Programming footer

If you record a macro when you do this manually, you'll see that &U turns on/off
underlining. Just select your charactersto underline, then hit the A icon and
format those characters like you want:

ActiveSheet.PageSetup.RightFooter = _
"&""Brush Script mt,italic""&14&U" & Application.UserName & _
Chr(10) & "&U&""Times New Roman""&8" & "&D &T"

Donald wrote:

The following code will programmatically add the user's name as well as date
and time to the right footer as well as setting the fonts of both lines in
the footer.

ActiveSheet.PageSetup.RightFooter = _
"&""Brush Script mt,italic""&14" & Application.UserName & _
Chr(10) & "&""Times New Roman""&8" & "&D &T"

How do I get it to underline the user name? (only the user name)

--
D.S.


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Programming footer

Whoops, this actually seems to underline ALL of my footer

D.S.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Programming footer

The code I posted worked nicely for me (xl2002).

Can you post your code--and what is returned by application.username?



Donald Stockton wrote:

Whoops, this actually seems to underline ALL of my footer

D.S.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programming footer


Hi All,

How could i catch the result of a MsgBox and derive actions from th
user decision? Any help welcome!.

Thanks in advance

jose luis

P.D. Here is what i though will do the trick. I was wrong. :(


GuardarAntes()
MsgBox "Save Changes?", vbYesNoCancel, "Save?"

If VbMsgBoxResult.vbYes = 6 Then
MsgBox "Yes"
End If
If VbMsgBoxResult.vbNo = 7 Then
MsgBox "No"
End If
End Su

--
jose lui
-----------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...fo&userid=1331
View this thread: http://www.excelforum.com/showthread.php?threadid=27350

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Programming footer

Have you tried the documentation for Msgbox? It gives an example...

On Sun, 31 Oct 2004 00:53:45 -0500, jose luis
wrote:


Hi All,

How could i catch the result of a MsgBox and derive actions from the
user decision? Any help welcome!.

Thanks in advance

jose luis

P.D. Here is what i though will do the trick. I was wrong. :(


GuardarAntes()
MsgBox "Save Changes?", vbYesNoCancel, "Save?"

If VbMsgBoxResult.vbYes = 6 Then
MsgBox "Yes"
End If
If VbMsgBoxResult.vbNo = 7 Then
MsgBox "No"
End If
End Sub


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
Excel footer to look like Word footer? Carole O Excel Discussion (Misc queries) 5 June 2nd 08 11:25 PM
Programming help BB Excel Discussion (Misc queries) 3 December 5th 05 01:09 AM
Programming to VBE Ron de Bruin Excel Programming 1 September 15th 04 07:51 PM
Programming lag Ernst Guckel[_3_] Excel Programming 4 June 9th 04 03:40 PM
Landscape Orientation when Footer set using mso-footer-data Disappear Vish[_2_] Excel Programming 0 November 14th 03 09:28 PM


All times are GMT +1. The time now is 06:47 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"