#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 189
Default 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
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
First page of Excel sheerepeats in print layout or print preview philfrotonda Excel Discussion (Misc queries) 1 July 12th 07 09:28 PM
Print and Print Preview Graphic Moving Resizing 2007/2003 Adam Rayburn Excel Discussion (Misc queries) 0 April 4th 07 04:18 PM
cell borders that I create dont show on print preview or print scott3435 Excel Discussion (Misc queries) 2 April 6th 06 02:37 AM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM


All times are GMT +1. The time now is 02:49 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"