Code to auto update a footer

V

Valerie M

In Excel 2003 I have code in an Addin that inserts a document id into
the footer. Users run the code from a toolbar.

I need the code to automatically update itself when any workbook is
created, opened, saved or printed. If I put the event code (eg
Workbook_BeforeSave) into the addin, it only works for the addin
workbook. Is it possible to get the code to work for every workbook,
without having to add it to each workbook?
 
B

Bill Renaud

I haven't used this particular feature myself, but take a look at the
following topics in Microsoft Visual Basic Help:

Application Object Events
Using Events with the Application Object

In Excel 2000, these topics are a little hard to find. Start with any
workbook event that has the "Using Events..." link in it, click on that,
then click on the "See also" link at the top of the page, to gradually
drill down to the "Application Object Events" topic.

You might also refer to a few pages on Chip Pearson's web site:

"Application Events" (http://www.cpearson.com/excel/AppEvent.aspx)
"Events And Event Procedures In VBA"
(http://www.cpearson.com/excel/Events.aspx)
 
V

Valerie M

Thanks Bill. That was exactly what I needed. Now I can control what
happens when opening, saving or printing any worksheet. Fantastic!
 

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