SYSTEM VALUES as footer

A

AMAYES

I need to know how to insert the system register user name
as a footer in a document.
I create documents and e-mail them - then they get changed
and printed - I want to know which system was the
worksheet printed from.
 
F

Frank Kabel

Hi
put the following code in your workbook module (not in a standard
module):

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.Worksheets
With wkSht.PageSetup
.CenterFooter = Environ("computername")
End With
Next wkSht
End Sub
 

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

Top