Custom information in Excel footer
A couple of things that I can think of is, first, that your Macro Security
setting may not even be providing you with any alert/warning that the
workbook contains macros.
You did save the book with the macro in it as a .xlsm file, didn't you? It
needs to be a .xlsm vs .xlsx file.
Now, back to security settings. Click the Office button, then the [Excel
Options] button at the lower right corner of that window. Go to the Trust
Center. Look at Macro Settings first, and make the "Disable all macros with
notification" button the option of choice. This will cause workbooks not in
"trusted locations" to provide a yellow alert bar near the top of the Excel
worksheet window telling you to "click here for more options" which will
allow you to choose whether to allow the macros in the workbook to run or
not. Naturally you would for books from known/trusted sources, and perhaps
not from unknown/doubtful sources until you can investigate the code.
You might also look at the [Trusted Locations] section also, that may give
you some ideas also.
Finally, after dealing with [Macro Settings] and/or [Trusted Locations],
look at the [Message Bar] section, and make sure that the "Show the Message
Bar in all..." option is selected.
Close Excel and reopen it, then open the workbook again and see if things
work - you should first see the pale yellow Message Bar saying that the book
has macros and asking you to click it to see the "Enable/Disable" window.
Enable them in that window.
Only other thing that might cause failure to perform at this point is if the
worksheets are protected.
Let me know how this goes. If things still don't seem right, add this line
of code somewhere within the Workbook_Open() code segment, after all of the
Const and Dim statements:
MsgBox "I am a macro, and I am running!"
And if you see that message when you open the workbook, but footers still
don't get set up, we have some further looking to do.
Oh - you did change the name of the worksheet up in the declarations section
to hold the name of the sheet you've chosen to hold those 4 information
items, didn't you?
"kmewing" wrote:
I found how to access View Code in Excel 2007. I inserted the code as you
stated (making changes in the code where specified). I get no errors, but
when I do Print Preview, no information appears in the footer. Are there any
other parameters to check?
|