![]() |
print
hi,
How can I have the name of the Computer I'm sending, on the prints?like in footer?I'm working in a network and I wanna know who is sending prints! thanx |
print
Sub Footer()
With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into a General Module in your workbook. You could also place the code into a BeforePrint event to save manually running.. Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into Thisworkbook module in your workbook. Gord Dibben MS Excel MVP On Wed, 9 Jan 2008 12:57:00 -0800, peyman wrote: hi, How can I have the name of the Computer I'm sending, on the prints?like in footer?I'm working in a network and I wanna know who is sending prints! thanx |
print
hi Gord,
thanx for the Codes.I just entered the first code in a module but nothing happened! should I do anything else? "Gord Dibben" wrote: Sub Footer() With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into a General Module in your workbook. You could also place the code into a BeforePrint event to save manually running.. Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into Thisworkbook module in your workbook. Gord Dibben MS Excel MVP On Wed, 9 Jan 2008 12:57:00 -0800, peyman wrote: hi, How can I have the name of the Computer I'm sending, on the prints?like in footer?I'm working in a network and I wanna know who is sending prints! thanx |
print
Assuming you entered the Footer macro in a general module you would then run the
macro. If still in the Visual Basic Editor, just Alt + q to go back to Excel. ToolsMacroMacros. Select the Footer sub and "Run" Do a printpreview on the active sheet and see what you have for a footer. If you need more help on where to enter the different types of code see Ron de Bruin's site http://www.rondebruin.nl/code.htm Gord On Wed, 9 Jan 2008 13:39:00 -0800, peyman wrote: hi Gord, thanx for the Codes.I just entered the first code in a module but nothing happened! should I do anything else? "Gord Dibben" wrote: Sub Footer() With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into a General Module in your workbook. You could also place the code into a BeforePrint event to save manually running.. Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into Thisworkbook module in your workbook. Gord Dibben MS Excel MVP On Wed, 9 Jan 2008 12:57:00 -0800, peyman wrote: hi, How can I have the name of the Computer I'm sending, on the prints?like in footer?I'm working in a network and I wanna know who is sending prints! thanx |
print
thanx Gord.got it.
"Gord Dibben" wrote: Assuming you entered the Footer macro in a general module you would then run the macro. If still in the Visual Basic Editor, just Alt + q to go back to Excel. ToolsMacroMacros. Select the Footer sub and "Run" Do a printpreview on the active sheet and see what you have for a footer. If you need more help on where to enter the different types of code see Ron de Bruin's site http://www.rondebruin.nl/code.htm Gord On Wed, 9 Jan 2008 13:39:00 -0800, peyman wrote: hi Gord, thanx for the Codes.I just entered the first code in a module but nothing happened! should I do anything else? "Gord Dibben" wrote: Sub Footer() With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into a General Module in your workbook. You could also place the code into a BeforePrint event to save manually running.. Private Sub Workbook_BeforePrint(Cancel As Boolean) With ActiveSheet .PageSetup.CenterFooter = Environ("ComputerName") & " " & Now 'or .PageSetup.CenterFooter = Environ("UserName") & " " & Now End With End Sub Enter the above into Thisworkbook module in your workbook. Gord Dibben MS Excel MVP On Wed, 9 Jan 2008 12:57:00 -0800, peyman wrote: hi, How can I have the name of the Computer I'm sending, on the prints?like in footer?I'm working in a network and I wanna know who is sending prints! thanx |
All times are GMT +1. The time now is 12:36 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com