Open a form

A

Alvin Hansen

Hi'

How can i make it so my form open when i open
the document

Hope some one can help

alvin
 
T

Tony Jollans

Assuming you mean a VBA Userform and not a Word Form, you need to code
UserFormName.Show in either an AutoOpen macro or a Document_Open Event
macro.

AutoOpen macros can go in any standard code module (just call the procedure
AutoOpen). Document_Open Event macros must go in the ThisDocument class
Module (select Documnet from the left hand dropdown in the main VBE code
window, and then Open from the right hand dropdown). Both may go either in
your document or its Template, depending on requirements.
 
A

Alvin Hansen

thanks
But can't use it anyway, because when form open i can't use word
so have to do something else.
i write about this in "using macros"

thanks
Alvin


"Tony Jollans" skrev:
 
D

Doug Robbins

Or if you mean when you create a new document, the macro should be named
AutoNew and be located in the template that is used as the basis of the
document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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