Consulting

Results 1 to 3 of 3

Thread: vbModeless question

  1. #1
    Moderator VBAX Master austenr's Avatar
    Joined
    Sep 2004
    Location
    Maine
    Posts
    2,033
    Location

    vbModeless question

    I want to open a user form where people go to grab information. Its used occasionally throughout the day many times. The problem is I want the userform to remain active and still allow the opening of other workbooks so they are not constantly opening the workbook everytime they want to use the form. If I use

    userform1.show
    it of course disables the use of any other workbook until the form is closed.

    I tried this to keep the form and its associated workbook open and still allow opening of other workbooks:

    Call UserForm.Show(vbModeless)
    in the workbook open but it throws an error. Any ideas on how to solve this is appreciated.
    Peace of mind is found in some of the strangest places.

  2. #2
    Userform.Show vbModeless
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

  3. #3
    VBAX Sage
    Joined
    Apr 2007
    Location
    United States
    Posts
    8,724
    Location
    1. UserForm or UserForm1 ???

    First example uses UserForm1, but the troublesome line uses just UserForm

    Call UserForm.Show(vbModeless)


    2. Both ways belowwork for me. That WB opens, UF displays, and I can open other workbooks

    Private Sub Workbook_Open()
        Load UserForm1
        Call UserForm1.Show(vbModeless)
    End Sub
    or

    Private Sub Workbook_Open()
        Load UserForm1
        UserForm1.Show vbModeless
    End Sub
    Last edited by Paul_Hossler; 02-26-2021 at 02:06 PM.
    ---------------------------------------------------------------------------------------------------------------------

    Paul


    Remember: Tell us WHAT you want to do, not HOW you think you want to do it

    1. Use [CODE] ....[/CODE ] Tags for readability
    [CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
    2. Upload an example
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
    3. Mark the thread as [Solved] when you have an answer
    Thread Tools (on the top right corner, above the first message)
    4. Read the Forum FAQ, especially the part about cross-posting in other forums
    http://www.vbaexpress.com/forum/faq...._new_faq_item3

Posting Permissions

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