How to make the dialog box automatically load?

R

Robert

I have a template with an attached dialog box (userform).
Whenever a new document is created based on the template,
I want the dialog box to show as well. How do I make this
happen automatically? Do I use AutoNew? Thanks.
 
C

Cindy M -WordMVP-

Hi Robert,
I have a template with an attached dialog box (userform).
Whenever a new document is created based on the template,
I want the dialog box to show as well. How do I make this
happen automatically? Do I use AutoNew?
Yes, AutoNew would be good :)

Or the Document_New event in the ThisDocument modula.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:)
 
D

dbddavid

Robert
If you only want the dialog box to appear when a new document opens you
could use a macro, but if you name the macro AutoNew if anyone would go
to the macro area of Word they would be able to run it anytime they
wuld want. A better method would be to create a subroutine for the
document and name it Document_New. This subroutine will only open when
a new docuemnt is created based on the template.
 
G

Guest

-----Original Message-----
I have a template with an attached dialog box (userform).
Whenever a new document is created based on the template,
I want the dialog box to show as well. How do I make this
happen automatically? Do I use AutoNew? Thanks.
.
Open the template, go to VB Editor and open the code
module for ThisWorkbook. Find the Workbook_New event and
enter the following code

MyUserForm.Show

The assumption in this case is of course that MyUserForm
is the name of the form
 

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