0

In my Workbook I have an UserForm. While the UF is open I want that it is possible to make some changes in the worksheet or in another workbook.

I tried it with:

Call UserForm1.Show(vbModeless)

and:

UserForm1.Show vbModeless

Also I change the UF Settings by "ShowModal" to False.

But with all three examples the UF is shown and closed in a few seconds. So I can not fill the TextBoxes in the UF. The Makro runs without stopping when UF is shown

What do I have to change, that my macro will stop after it reached UserForm1.Show vbModeless ?

Whole Macro:

Sub Test_Click()
    Call UserForm1.Show(vbModeless)                  ' First Try
    ' UserForm1.Show vbModeless                      ' Second Try
    ' Change UF Settings ShowModal to False

    If UserForm1.ActiveControl.Name = "Cancel" Then
        Unload UserForm1
        Exit Sub
    Else
        ActiveSheet.Shapes.Range(Array("WWP")).Visible = True
        ActiveSheet.Shapes.Range(Array("WP")).Visible = False
    End If
End Sub
halfer
  • 19,824
  • 17
  • 99
  • 186
diem_L
  • 389
  • 5
  • 22
  • Possible duplicate of [Modeless form that still pauses code execution](https://stackoverflow.com/q/16859038/11683) – GSerg Nov 05 '18 at 08:11
  • 1
    Your question suggests that you want execution to stop once the form is shown, i.e. not continue down the `Sub` and process the later commands. I'd suggest you remove the code *below* the `Userform1.Show` and put that code in another routine that gets called when you want it, not immediately after the form is displayed. – CLR Nov 05 '18 at 11:45

0 Answers0