Header & Footer function

  • Thread starter Thread starter B.
  • Start date Start date
B

B.

This might be an obvious answer. But, I do not know the
wording to put in my footer to show the path of where my
files is saved.

I want it to do it automatically without me typing all the
path details.

Currently I know I can do &[file] and &[tab] I try to do &
[path] that does not work.

doing an auto word insert with filename and path works in
WORD but not in excel.

Help any ideas!
 
Hi
you may put the following code in your workbook module:

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In Me.worksheets
With wkSht.PageSetup
.Centerfooter = me.path
'.Centerfooter = me.fullname 'Alternative including path +
name of the workbook
End With
Next wkSht
End Sub
 
Back
Top