H
Howard Brazee
I want my footing in an Excel spreadsheet to include the path as well as the
&[file]. How do I do that?
&[file]. How do I do that?
Take a look here:
http://www.mcgimpsey.com/excel/fullnameinfooter.html
Howard Brazee said:I want my footing in an Excel spreadsheet to include the path as well as the
&[file]. How do I do that?
Howard Brazee said:I started a macro in This WorkBook named Workbook_BeforePrint, and
pasted the above into it. When I tried opening the macro I have to
type in its name and I see it.
The only effect I can find, is if I exit the spreadsheet and return,
it has a very irritating message asking me if I want macros enabled.
I experimented by putting the file name in LeftFooter and leaving it
out. Either way, I found no evidence of a path.
So I need to find out how to tell the spreadsheet to do the macro
when I press Print or Print Preview, how to make all workbooks do
this, and how to tell Excel to stop asking me if I want macros
enabled.
This is an event macro. You don't run it directly. Rather it
automatically runs when you invoke the Print or Print Preview command.
You don't say whether you attempted to print (or use print preview) -
did you? That's what will cause the macro to fire.
For all workbooks, see the "How to make all or new workbooks print the
path and filename" quick link on the page I referenced. If you follow
the advice there (using an add-in - one's available for download, or you
could make your own), you won't be asked about macros in each workbook.
Howard Brazee said:Yep, that's what the page says, and that's what I hoped it would do.
You can automate this task by putting this macro in the ThisWorkbook code
module of your workbook
In the ThisWorkbook module, enter
Do you have your Security setting at High?
It works for me using XL98/01/v.X/03/04. And when I had XL00 installed,
it worked there too.
Your workbook event procedures must be placed in the ThisWorkbook
code module, not a regular code module like Module1.
Well, the documentation for the first macro says
which is what you need to do, rather than put it in a regular code
module. There's even a link to my
http://www.mcgimpsey.com/excel/modules.html#workbook
page, which has a picture illustrating how to select the ThisWorkbook
module.
Likewise the class example says:
Open the VBA Editor (ALT+F11), and delete all the code in the
"Microsoft Excel Objects" modules, and delete any other modules
or userforms.
That worked. I tried deleting the modules without deleting the code, and
that
didn't work.