Consulting

Results 1 to 3 of 3

Thread: Solved: Set focus to document

  1. #1
    VBAX Regular
    Joined
    Dec 2010
    Posts
    21
    Location

    Solved: Set focus to document

    Hi all,

    I have a (large) form where users fills some fields to compose a document.
    This form has a button to hide itself so the user can edit the document confortably (without a form on top of it).

    I would like to have a small form (just a button) to show the main form again when editing is over, working like a floating toolbar...
    The button that hides the main form shows this second form (modeless), no problem here.

    But I want focus on the document when this happens, and not on this second form.
    How can I do this?

    I really prefer using this second instead of menus or Alt+key to show the main form (I know my users ).

    I´m using MS Word 2003.

    Thanks in advance for any help.

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,340
    Location
    Try:

    [VBA]Private Sub UserForm_Activate()
    Application.Activate
    End Sub[/VBA]
    Greg

    Visit my website: http://gregmaxey.com

  3. #3
    VBAX Regular
    Joined
    Dec 2010
    Posts
    21
    Location
    Thanks Greg!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •