Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Minimizing Word & Showing Userform

Status
Not open for further replies.

BobHunter

Programmer
Mar 26, 2001
62
GB
I am using the below code so that when the user opens the document, it displays ther userform and hides Word, but I cannot get the focus onto the userform. I have to click the taskbar to display it.

Any ideas or better methods ?

Sub AutoOpen()
Dim Docname As Variant
Docname = ActiveDocument.Name
Windows(Docname).WindowState = wdWindowStateMinimize
frmMainForm.Show
End Sub

Word2000 9.0.4402 Win2000
 
Try:
[tt]Application.Activate
frmMainForm.Show[/tt]

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top