View Single Post
 
Old 07-12-2018, 01:33 PM
LimpingBuf LimpingBuf is offline Windows 10 Office 2016
Novice
 
Join Date: Feb 2007
Posts: 3
LimpingBuf
Default Showing userform in document open results in error message

This should be easy but I can't make it work. I would like to distribute to outside clients templates of various contracts we have created for them. I have created a template (call it the "parent template") that holds a form that populates a list box with the template names and allows the user to select a template and create a new contract based on the selected template.

The form itself works fine when activated from a macro when the parent template is open. However, when I try to open the form using the document open event based in the parent template, I get a message saying:

"You cannot close Microsoft Word because a dialog box is open. Click ok, switch to Word, and then close the dialog box."

Either X'ing out or clicking on ok puts me into the form and everything works fine from that point in.

The other point to be aware of that may be a factor is that after the new document is created, the form is closed and the parent template is closed.

I use a similar system to allow people within my firm to access contract templates and it works quite well. However, in our firm we distribute a parent template that is loaded into word at startup. A macro is installed on the user's toolbar and that activates and shows the selection form. Unlike the client project, our internal project does not close the parent template.

A long winded question, but hopefully that gives you an idea of what I trying to do. I suspect that there is an easy fix, but i can't find it.
Reply With Quote