I have created a spreadsheet for my department to use to list their projects
for each week. Just wondering if there is an automatic way to have the
various author's names inserted in the footer or in a cell without them
needing to do it. Any suggestions would be appreciated...
Does that equate to the person submitting to print with the name
they want to use --- application.username
or are you trying to do something for security purposes as to who
printed it from a network logon, a little less beyond their control
(printing easily bypassed/modified).
Some references on my site:
www.mvps.org/dmcritchie/excel/userid.htm
www.mvps.org/dmcritchie/excel/pathname.htm
www.mvps.org/dmcritchie/excel/property.htm
My own choice would be installing a macro to be invoked by user
before printing. I prefer this to automatically including when printing
anything because one might occasionally print someone else's
material or want a different format..
Header
left: (blank)
middle: title
right: username
Footer
left: full pathname -- modified for readability
middle: Page x of xx
right: date and time as in yyyy-mm-dd hh:mm
Read about the following code with your modification to include username
www.mvps.org/dmcritchie/excel...ame.htm#footer
I would assign the following code to a toolbar button (smilyface)
Sub PutFileNameInFooter()
'Documented in www.mvps.org/dmcritchie/excel/pathname.htm
'alternative -- lowercase for pathname Sheetname as is within square brackets
'also using an 8 point font, lettercase of Sheetname is unchanged in this
'example because you have control and can change it within the workbookbook
'Use of WITH provide a prefix for names that begin with a period
With ActiveSheet.PageSetup
'-- modified to include username -- special request 2006-01-30
.RightHeader = application.username
.LeftFooter = quot;amp;8quot; amp; _
LCase(Application.ActiveWorkbook.FullName) amp; quot; amp;A quot;
If .RightFooter = quot;quot; Then .RightFooter = quot;Page amp;P of amp;Nquot;
End With
End Sub
If unfamiliar with macros see
www.mvps.org/dmcritchie/excel/getstarted.htm
for help in searching newsgroups
www.mvps.org/dmcritchie/excel/xlnews.htm
and use of your real name would be more friendly.
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: www.mvps.org/dmcritchie/excel/excel.htm
Search Page: www.mvps.org/dmcritchie/excel/search.htm
quot;dneal53quot; gt; wrote in message ...
gt; I have created a spreadsheet for my department to use to list their projects
gt; for each week. Just wondering if there is an automatic way to have the
gt; various author's names inserted in the footer or in a cell without them
gt; needing to do it. Any suggestions would be appreciated...
- Nov 18 Sat 2006 20:10
Insert current author's name in cell or footer in Excel??
close
全站熱搜
留言列表
發表留言