Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
First page of Excel sheerepeats in print layout or print preview | Excel Discussion (Misc queries) | |||
Print and Print Preview Graphic Moving Resizing 2007/2003 | Excel Discussion (Misc queries) | |||
cell borders that I create dont show on print preview or print | Excel Discussion (Misc queries) | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Active cell counting in particular print page (one sheet having different print area) | Excel Worksheet Functions |