User form query

User form query

Didn't find your answer?

Would someone please explain to me the distinction between a "modeless" user form and one that is not "modeless"?

With kind regards

Clint Westwood

Replies (4)

Please login or register to join the discussion.

By Tim Vane
08th Feb 2017 07:58

I assume you mean the difference between modeless and modal? A modeless form is one that is "active" at the same time as other forms within an application, whereas a "modal" form deactivates all other forms until it is closed.

So for example, in Excel, the search window is modeless (you can edit cells or use the menu while the form is open), but the "Format cells" window is modal.

Thanks (1)
Replying to Tim Vane:
avatar
By nogammonsinanundoubledgame
08th Feb 2017 11:32

Thanks that makes sense.

So if you are creating your own user form in a workbook in VBA, is it easy to explain how to make it modeless? I believe (happy to be corrected) that by default they are modal.

With kind regards

Clint Westwood

Thanks (0)
Replying to nogammonsinanundoubledgame:
The triggle is a distant cousin of the squonk (pictured)
By Triggle
08th Feb 2017 16:01

Right click on the form and click Properties. Set the ShowModal property to False.

Thanks (1)
avatar
By keithas
21st Apr 2017 15:10

Yes the default is modal.
The ramification of using modeless is that your code will continue to run. So, if you want your code to wait until a response to your userform, you must put "userform.show" at the end of a sub. Any code you want to run thereafter needs to be called from the userform code.

Thanks (1)