Consulting

Results 1 to 3 of 3

Thread: Multiple user form show/Hide problem

  1. #1
    VBAX Tutor
    Joined
    Dec 2006
    Posts
    271
    Location

    Multiple user form show/Hide problem

    I have a project which has a number forms but they keep disappearing!!!

    They are all set as ShowModal = true

    Each form has a button which will open the next form
    the routine is from userform1

    userform1 has a cmdButton: userform2.show - (userform 1 is not closed or unloaded)

    Userform2 has a cmdbutton: userform3.show - (userform2 is not closed or unloaded)

    userform3 has a cmdButton: useform4.show - (userform3 is not closed or unloaded)

    This is when I start to get a problem;

    userform 4 has a cmdbutton to unload userform4 and show userform3

    [VBA]Private Sub cmdClose_Click()
    Unload Me
    userform3.Show
    End Sub[/VBA]

    When this runs, all the forms close and no forms are visible

    Is this a bug or am I doing something wrong?

  2. #2
    If userform3 was already showing, then the Userform3.Show shouldn't be needed, should it?
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  3. #3
    VBAX Regular
    Joined
    Dec 2008
    Posts
    51
    Location
    Might try the Unload command after the show command.
    Private Sub cmdClose_Click()
    userform3.Show
    UnLoad UserForm4
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •