Entering Path Name in Footer

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to put a code into the footer that will automatically put the
path and file name in an Excel spreadsheet. I know that this is a function
available in the 2002 version, but I have to work in 2000 for very specific
reasons. Is this possible? Can anybody help me figure this out?

Thank you.
 
Hi Frank!

I'm trying to print the file path in the footer, and I followed the
instructions from McGimpsey's "Automatic Method - Per Workbook", but I keep
getting an error message: Run-time error '50290': Method 'FullName' of object
'_Workbook' failed.

I placed the code in ThisWorkbook as instructed and I believe I typed it
correctly (but I'll paste it below just in case I'm missing something). Any
thoughts?

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = Me.FullName
Next wsSht
End Sub
 
Hi Frank!

I am trying to insert the file path in my page footer and followed the
instructions from McGimpsey's "Automatic Method - Per Workbook", but I'm
getting an error message: Run-time error '50290': Method 'FullName' of object
'_Workbook' failed.

I placed the code in ThisWorkbook as instructed, and I believe I've typed it
correctly (but I'll paste it here just in case I've missed something). Any
thoughts?

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wsSht As Worksheet
For Each wsSht In ActiveWindow.SelectedSheets
wsSht.PageSetup.LeftFooter = Me.FullName
Next wsSht
End Sub
 
Followup: I only get the error message when I preview. Printing works fine.

Sorry for the second post - I got an error message (both times, actually)
saying that my post did not occur. Then I came in later to try again, and
saw that they both posted. D'oh!
 

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