![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Microsoft Office support MS Office support forum |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Apr 2005
Location: North Yorkshire
Posts: 59
OS: XP Pro SP3, Vista Home Premium, W2K Pro SP4
|
Hiding userforms in MS Word (Vba)
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. Last edited by jst0076; 12-06-2006 at 02:46 AM. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
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.
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: Apr 2005
Location: North Yorkshire
Posts: 59
OS: XP Pro SP3, Vista Home Premium, W2K Pro SP4
|
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?
|
|
|
|
|
|
#4 (permalink) |
|
Moderator/ Rangemaster TSF Academy; Analyst, Security Team; Oor Wullie; TSF Surgeon and Resident Comic
|
Can you post some of the code that opens/closes your user forms? It would give me a better idea (although Word coding is not my strong point).
__________________
Iain - Defender of the Haggis and all things Scottish. I don't help by PM - post in the Forums. ![]() ![]() PC Safety & Security::PC running a bit slow?::Donate::Photographers Corner |
|
|
|
![]() |
| Thread Tools | |
|
|