View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default Printing a User

It worked!! Thanks Ron, you don't realize how big of a headache you just
saved me. Thanks Again

"Ron de Bruin" wrote:

Hi Dan

When another user print the workbook their name is on the printout

Try this

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.PageSetup.RightFooter = "&8User : " & _
Environ("username") & " Print this on " & _
Format(Now, "yyyy-mmm-dd hh-mm-ss")
Next wkSht
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dan" wrote in message ...
Ron,
That kinda works. The spreadsheet that I want this to happen on goes to
several users, and I want each of their names displayed when they print.
Right now it always shows just my name. If I could bother you for one more
problem. Is there a way that I could insert the time the ss was filled out
automatically?

Dan

"Ron de Bruin" wrote:

Try this Dan for the footer

'Right click on the Excel icon next to File in the Worksheet menu bar
'Choose view code
'Paste this event there
'Alt-q to go back to Excel

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ThisWorkbook.Worksheets
wkSht.PageSetup.RightFooter = "&8User : " & _
Environ("username")
Next wkSht
End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Dan" wrote in message ...
When a user prints a spreadsheet I would like to be able to put somewhere on
the page the name of the user that the spreadsheet was printed by. I assume
this is a simple process, but just can't figure it out.