-
The UF and its code are in a separate template (John.dot), which is loaded when Word is started. i.e. it lives in C:\Users\<username>\AppData\Roaming\Microsoft\Word\StartUp\John.dot.
The UF is initially associated with doc C, which happens to be the active document when the UF is opened. When the user indicates (by clicking a NEXT button on the UF) that work on doc C has been completed, then, by closing the UF, making B the active doc, and then (in the re-jigged routine) re-opening the UF, the UF is then associated with doc B. Likewise for doc C. This seems to get around the problems I was having.
It seems to me that UFs always begin life associated with the document that is active at the time the UF is opened, which is why, when you have multiple Word docs open at one time, a UF can disappear off screen or even get closed when the original doc is closed or when another doc is given the focus by clicking on it or from within VBA.
It would be good to know if there is a way to open a userform that is entirely unrelated to any particular Word document.
Last edited by johndavidson; 05-20-2022 at 08:02 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules