0

I have created a userform. If I open the userform, I am unable to edit in the active document. I need to handle both userform and active document simultaneously.

For example: If we press ctrl+f, the find dialog box will be displayed. With that dialog box open we can scroll, edit etc in the active document.

Ben Rhys-Lewis
  • 3,118
  • 8
  • 34
  • 45
vidhya
  • 449
  • 7
  • 22

1 Answers1

2

The answer is quite easy- all you need is to open/show UserForm in modeless state. You can do it by adding additional parameter to .Show method:

UserForm1.Show vbModeless

Please keep in mind that it is for UserForm, not for Message Box (MsgBox).

Kazimierz Jawor
  • 18,861
  • 7
  • 35
  • 55
  • I tried it. When I click in the active document with userform opened,userform is become hidden.I want both active document and userform visible and editable. By using `vbmodeless` option I could move my cursor to active document without closing userform but as soon as I keep cursor in the active document the userform is not visible. – vidhya Dec 20 '14 at 11:55
  • what I do- I resize the document/application window to 75% of screen width and move UserForm outside Word application to area of 25% left. To have both form as a kind of panel which could be docked and visible you need to do it in VSTO with either C# or VB.Net where you could create something like `Custom Task Pane`. – Kazimierz Jawor Dec 20 '14 at 13:13
  • Can you give any start-up program to acheive this?From that I will make up to my requirements. Because I don't know c# nor VB.Net – vidhya Dec 22 '14 at 05:49
  • check [this](http://stackoverflow.com/questions/24577747/excel-custom-task-pane-not-showing) and other search in google. – Kazimierz Jawor Dec 22 '14 at 15:30
  • Modeless mode itself worked fine for me. The issue was with some other macros made userform modeless mode failure. – vidhya Dec 23 '14 at 11:03