Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Printing a User

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Printing a User

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.


  #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.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Printing a User

You are welcome
Thanks for the feedback

--

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


"Dan" wrote in message ...
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.


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

Ron,

Don't suppose I could quiz you on one more item? Is there a way to increase
the font size?

thanks a bunch
Dan

"Ron de Bruin" wrote:

You are welcome
Thanks for the feedback

--

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


"Dan" wrote in message ...
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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Printing a User

If you look at Ron's code, you'll see this line:

wkSht.PageSetup.RightFooter = "&8User : " & _

That &8 means 8 pt font.

Change it to what you want.

Sometimes you can record a macro when you do things like change font or font
size and you'll see how excel records your actions.

Dan wrote:

Ron,

Don't suppose I could quiz you on one more item? Is there a way to increase
the font size?

thanks a bunch
Dan

"Ron de Bruin" wrote:

You are welcome
Thanks for the feedback

--

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


"Dan" wrote in message ...
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.




--

Dave Peterson
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
User printing Frank Rudd via OfficeKB.com Excel Discussion (Misc queries) 5 July 25th 05 09:55 PM
How to prevent user from printing in Excel? C Wayne Excel Discussion (Misc queries) 3 June 14th 05 09:10 AM
Printing Part of User Form mully New Users to Excel 1 May 26th 05 08:22 AM
Printing a User Form mully New Users to Excel 6 May 19th 05 01:26 PM
Printing User Forms mickiedevries[_7_] Excel Programming 7 June 29th 04 06:06 PM


All times are GMT +1. The time now is 10:09 PM.

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"