full path name in footer

J

Joanne Ramaekers

I'm using Excel 2000. Does anyone know how to get a full
path name of the file and not just the file name and the
folder it is in?
 
N

Norman Harker

Hi Joanne!

In Excel 2000 you need the following code in the ThisWorkbook module
for the workbook.

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


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
J

Joanne Ramaekers

I just can't seem to get this working. I only know litte
of VB.
I have put in the syntax below, but I can't never see it
again (under macros). Strange thing is, I got it to work
once but I don't know how I did it, and now I can't seem
to do it again.

Brain overload
Jo
 
P

Peo Sjoblom

Right click on the excel icon to the left of the file menu name, select view
code and paste in the code.
Press alt + q to close the VBA editor. Save the workbook (you can also press
alt + f11, find the workbook in the project pane to
the left and double click ThisWorkbook and paste it..)
 
J

Joanne Ramaekers

I get the following syntax error:
Run-time error '50290':
Method 'FullName' of object 'Workbook' failed
 
N

Norman Harker

Hi Joanne!

Would you like me to send you a workbook with it working just so you
can test your system?

But Peo's instructions are (of course) correct.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
[email protected]
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Top