full path of excel file

G

Guest

how to show the full path of excel file in the foot of page while printing?
excel 2K only gives me the option for the name of the file not the full path.
 
B

Bob Phillips

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With activepage.PageSetup
.LeftFooter = ThisWorkbook.FullName
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)


Song said:
how to show the full path of excel file in the foot of page while printing?
excel 2K only gives me the option for the name of the file not the full
path.
 
B

Bob Phillips

Typo, should be

Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = ThisWorkbook.FullName
End With
End Sub


--

HTH

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

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