
Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
If your users are not using Word97 or MacWord, you have the option to open a
userform as modal(vbModal)(the default) or modeless(vbModeless).
(snip)
Modal vs. Modeless:
The definition of a modal form is that it must be closed (hidden or
unloaded) before you can continue working with the rest of the application
(hence it is also shown on top; but this is rather a "side effect" so to
speak). For example, a dialog box is modal if it requires you to click OK or
Cancel before you can switch to another form or dialog box.
Modeless dialog boxes let you shift the focus between the dialog box and
another form without having to close the dialog box. You can continue to
work elsewhere in the current application while the dialog box is displayed.
Modeless dialog boxes are rare. From the Edit menu, the Find dialog box in
Visual Basic is an example of a modeless dialog box.
(snipped taken from the MSDN library)
Caution:a modeless userform allows the user to change non-userform windows
while the form is showing.
(snip)
In VBA, you can show a form as vbModal or vbModeless. In Visual Basic .NET,
the ShowDialog method is used to display a form modally; the Show method is
used to display a form non-modally. Note, however, that the form will
display non-modally, but when you click in the Word or Excel document, the
form moves to the background, which can be confusing to your users.
(/snip)
See also:
<http://support.microsoft.com/kb/171978/EN-US/>
So if you invoking the userform from the *document* that is open via the
template, use, i.e.:
MyUserForm.Show vbModeLess
Then that connection to the invoking document may be separated enough to
allow closing of that document while the userform is still in memory.
Since I don't have access to anything but Word97 or MacWord, I can't test if
you can change a form from modal to modeless, with a simple .hide in
between, or if once a form is in memory, only Windows API calls can change
the form window attributes.
But since a userform can't unload itself and reload itself from/to memory,
template code or a third party code, would have to do that, to change a
modal userform to a modeless userform just before you want to close the
invoking document and back to modal after closing the document.
> Are you invoking the userform from the form that is open via the template?
> That situation would explain why the form can't be closed until the userform
[quoted text clipped - 101 lines]
>>>>
>>>> Thanks!

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID