ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printing a User (https://www.excelbanter.com/excel-programming/381826-re-printing-user.html)

Ron de Bruin

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.


Ron de Bruin

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.



dan

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.



Ron de Bruin

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.



dan

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.




Dave Peterson

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


All times are GMT +1. The time now is 07:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com