ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I set up foot page to print out the computer's name (https://www.excelbanter.com/excel-discussion-misc-queries/50588-how-do-i-set-up-foot-page-print-out-computers-name.html)

Bee

How do I set up foot page to print out the computer's name
 
How do I set up foot page to print out the computer's name

Bob Phillips

Option Explicit

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = "Computer name: " & Environ("Computername")
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Bee" wrote in message
...
How do I set up foot page to print out the computer's name





All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com