How To Run Macro on Open

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

Guest

Can I get my macro to run upon opening my Word document? I have ASK fields
that the users needs to populate, but I want to come up automatically so that
they will not have to remember the macro command.
 
Call the macro AutoNew (to run once, when the document is first created) or
AutoOpen (to run every time the document is opened).
 
Jezebel,

So I have a document template with a userform. I have a sub that filters
data I'm pulling from Excel to put into a combobox on my userform.

When I open my .dot, the .doc is created and the userform displays...how do
I get a macro to run from that userform code?

For example, I have three checkboxes that filter the data returned from
Excel...I don't want to put the filter on all three checkboxes (that's three
places I have to update instead of one). How do I get my checkbox_click to
run a sub located in module1?
 
Graham,

Maybe I missed it, but I didn't see any references to calling one set of
code from a currently running code on those pages.
 
The code to run a macro from another is

Application.Run MacroName:="macroname"


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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