PDA

View Full Version : Solved: Set focus to document



MK_
08-06-2011, 08:03 AM
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 :devil2:).

I´m using MS Word 2003.

Thanks in advance for any help.

gmaxey
08-06-2011, 12:22 PM
Try:

Private Sub UserForm_Activate()
Application.Activate
End Sub

MK_
08-06-2011, 02:32 PM
Thanks Greg!