Tech Support Forum banner
Status
Not open for further replies.
1 - 4 of 4 Posts

· Registered
Joined
·
73 Posts
Discussion Starter · #1 · (Edited)
I've had a lot of good advice here before and have my fingers crossed that someone can help out this time.

I have a document template set up that the user completes through a series of userforms. My colleagues want some help documents to be available while using these templates. The following sequence is what I would like to happen...

Document opens and user forms appear one after the other. There are help icons on the userforms that open other word documents that may contain tables, charts or even photos. If one of these documents is open, there is a close button in the bottom left corner that returns you to the userform you were last filling in.

The problem I have is that when a userform is open and you click the help button, the new document appears, but its behind the currnet userform. So I have written the code that makes the form hide when the help document is open. What I can't do is make the userform reappear. Where do I put the code to do that? I'm guessing it needs to be in the code of the close button in the help document, but I just cant get the syntax right. I know the command needs to be userform1.show, but how do you run this from one document to another?

If the above makes sense I'm sure the answer is simple, but I just can't get it right. Thanks in advance for any help.
 

· Premium Member
Joined
·
39,718 Posts
Hi

I can only answer in terms of what you would do in Excel, as I'm not familiar with Word's Object Model. When I'm using one form and then need to bring up a different form, I use UserForm1.Hide and then UserForm2.Show. You can use these in the code for one button, so I would normally hide the first form then show the second. Hide removes a form from view but retains it in memory. Hope that helps a bit.
 

· Registered
Joined
·
73 Posts
Discussion Starter · #3 ·
That would work, but when the userform in my project gets hidden, instead of another userform opening, a different document opens. I need the original userform to come back when the user closes the second document. Any ideas how to do this?
 
1 - 4 of 4 Posts
Status
Not open for further replies.
Top