Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User printing | Excel Discussion (Misc queries) | |||
How to prevent user from printing in Excel? | Excel Discussion (Misc queries) | |||
Printing Part of User Form | New Users to Excel | |||
Printing a User Form | New Users to Excel | |||
Printing User Forms | Excel Programming |