Share via

Auto Open Userform Problem

Anonymous
2011-10-07T22:07:09+00:00

I have code in Auto Open to open a UserForm when file opens.  This appears to work fine UNTIL I insert the Word file into a third-party storage-type location.  Then when you open the file, the form pops up but you don't see the Word document until after you've made selections.  This is disconcerting to users.

      Edit 2/25/2012:  I finally figured out how to fix the above I need this at the beginning of the Auto_Open code: 

                                                              ActiveWindow.Visible = True  

               (So simple, yet so difficult to get to because it doesn't seem like I should have to make it visible.)

Any ideas on how to ensure that Word fully opens before it pops up the userform? 

2nd problem is if you have dual monitors (and most of my users do), the form pops up sort of in the middle of the two monitors.  Is there any way to have it pop up on top the Word file it is associated with?  It's a fairly small form and is difficult to notice when it does this.

Thanks.

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-10-08T14:48:03+00:00

You can set the position of the userform (measured from top and left) with the following code in your userform

Private Sub UserForm_Activate()

    With Me

        .Top = 125 '< change 125 to raise or lower the window

        .Left = 125 '< change 125 to move the horizontal position

    End With

End Sub

Set the numbers so that the form displays where you can see it.

Was this answer helpful?

0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-10-08T11:36:27+00:00

    With dual monitors, I'm not sure where to tell the form to start - any ideas on that?

    Is there something other than Auto Open that can launch the user form like right after open?

    Was this answer helpful?

    0 comments No comments
  2. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2011-10-08T07:17:43+00:00

    I have code in Auto Open to open a UserForm when file opens.  This appears to work fine UNTIL I insert the Word file into a third-party storage-type location.  Then when you open the file, the form pops up but you don't see the Word document until after you've made selections.  This is disconcerting to users.

     

    Any ideas on how to ensure that Word fully opens before it pops up the userform? 

     

    2nd problem is if you have dual monitors (and most of my users do), the form pops up sort of in the middle of the two monitors.  Is there any way to have it pop up on top the Word file it is associated with?  It's a fairly small form and is difficult to notice when it does this.

     

    Thanks.

    Not sure about the first issue, but for the second, make use of the StartUpPosition attribute of the userform.

    Was this answer helpful?

    0 comments No comments