Word VBA >> Modeless forms

by m rafala » Mon, 26 Jul 2004 23:49:21 GMT

I'm updating an older macro by adding a non-modal form and I'm seeing
behavior I didn't expect. I simply want to be able to click in and out of my
form (which I can).

But also, when the macro reaches myForm.show, the form opens and the
following code immediately continues to execute. I was expecting the macro
to wait until the form is dismissed before continuing, as with modal forms.

Is this normal behavior for non-modal forms?




Word VBA >> Modeless forms

by Howard Kaikow » Tue, 27 Jul 2004 02:42:59 GMT


Modeless forms do not wait.
You have to restructure your code to eliminate code after the userform by
putting the code in the userform itself.

--
http://www.standards.com/ ; See Howard Kaikow's web site.


my
forms.





Similar Threads

1. in VB.net app how to show a modeless form when a model form s

like this  
    ''  Module1.vb
........
         Public Sub main()

               Dim frm As New Form1
               frm.ShowDialog()
         End Sub
........

''   Form1.vb
.........
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As 
System.EventArgs) Handles MyBase.Load

    Dim frm As New Form2
    frm.Show()

End Sub
...........

Form2.vb
..............
..............

I need Form1 and Form2 all working.



"Cor Ligthert" wrote:

> yzi,
> 
> Can you show a piece of code there are thousands of possibilities to show 
> forms
> 
> Cor
> 
> "yzi" < XXXX@XXXXX.COM >
> ....
> >I have a list form and a detail form .
> >
> > Before, I open the List form, use form.showDialog(),then I click List Item
> > and open the Detail Form by form.show().
> >
> > now , user need  when the list form show, auto open the first Item Detail 
> > .
> >
> > I add detail form.show() in list form.form_load event , but problem.
> >
> > some idea?? help me
> > 
> 
> 
> 

2. Display a modal form on top of a modeless form

3. Modal Form & Modeless Form

I have a book that references both of these terms, and the example given doesn't really explain what the differences are

The only visibile difference is, the Modal Form didn't have the Min and Max buttons on the form

The example is included in a chapter regarding SDI and MDI applications

Thanks for any help

John

4. Opening modeless forms on a modal form - Visual Basic/VB

5. Show a modeless Form over a Modal Form

    Is there a way to do it???

   Some kind of trick or something to show it?

   Hope you could help me!!!!



6. Modeless Form Ignores Keystrokes ONLY when called from VB.Net - Microsoft .NET Framework

7. Display modeless form from Sub Main

My project starts with Sub Main and then needs to display 
a modeless form.
From some reason the application closes it self after 
calling the Show method.
How can I avoid the application from being closed.
By the way in VB6 there is no problem to do it.
This is the code I have:

Option Explicit On 

Module Module1

    Public f1 As New Form1()

    Sub main()
        f1.Show()
    End Sub
End Module

8. modeless form from a multithreaded application - VB.Net