Two userforms on one sheet
Two userforms on one sheet
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Two userforms on one sheet

  1. #1
    Guest

    Default

     
    Is it possible to show two user forms at the same time on one sheet? (userform1 in the left corner and userform2 in the center)

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Chippenham, UK
    Posts
    136
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    It depends on what you want to do.

    You can bring up a second userform from an action from a userform that is already shown, but the last userform to be shown is the one that will hold the focus until it is hidden or unloaded.

    Code like:

    UserForm1.Show
    UserForm2.Show

    will show the first one and the second form won't show until the first form is closed or hidden.


    Regards,

    Gary Hewitt-Long

  3. #3
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sunny, spring-like Hull
    Posts
    3,339
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    A way round this could be to use a multi-page or tab-strip and put the controls from each userform on separate tabs or pages, so the user can flick back and forth between them.

  4. #4
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    If you are using excel2K + then you can show
    both forms BUT as Gary has said only one
    ,the last one loaded will have focus.
    The Key to showing both is to set the Modal property to False & obviously setting up the
    forms position ie have the Startupposition set to Manual.


    Ivan



  5. #5
    New Member
    Join Date
    Dec 2014
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Two userforms on one sheet

      
    try this. It will work as you wish

    userform1.show vbmodeless
    userform2.show vbmodeless

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com