print

  • Thread starter Thread starter peyman
  • Start date Start date
P

peyman

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
 
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
 
hi Gord,
thanx for the Codes.I just entered the first code in a module but nothing
happened! should I do anything else?
 
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.

Tools>Macro>Macros.

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
 
thanx Gord.got it.

Gord Dibben said:
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.

Tools>Macro>Macros.

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top