+ Reply to Thread
Results 1 to 2 of 2

Program Flow with Modal UserForms

  1. #1
    Registered User
    Join Date
    10-06-2006
    Posts
    82

    Program Flow with Modal UserForms

    Dear Excel Expert

    I have a program with a series of Modal User forms popping up.

    Depending on the user input within the UserForm I may want to present the user with a report in an Excel Worksheet.

    Hence the possible program flow I am after is:

    UserForm1 Modal.
    UserForm2 Modal. ->> User Input requires a report created in a Worksheet.
    Report WorkSheet (wait for user until done analyzing report)
    Userform3 Modal
    Userform4 Modal ->> User Input requires a report
    Report WorkSheet (wait for user until done analyzing report)
    Userform5 Modal
    .
    .
    .
    End Program.

    Requirements: User Input requires a report created in a Worksheet:

    User can view and scroll through the Report worksheet. Program Waits until they press PRINT or Cancel button. (buttons can be on a seperate UserForm or Embedded in the worksheet itself)

    How do I make the program wait for the user to click Print or Cancel while they are using a worksheet? Can I make the worksheet modal?

    If I make a Print Cancel Userform Modal I am assuming the user will not be able to manipulate the worksheet as program focus will be maintained on the Modal Userform.

    Thank you very much for your input.

    Peter.
    Last edited by ions; 01-22-2009 at 11:34 AM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi,

    I think you've got the general gist of the thing. By default User Forms come as Modal unless you set the ShowModal property to False.

    The trick is to design your forms and buttons so that forms are made modal or modeless at the appopriate time. For instance if you have three user forms which are all set to Modeless to start with, and you load them all you can of course navigate anywhere and use whichever form/worksheet you want. Suppose you want to restrict the user to one of the forms, say Form 1, when you press a button on Form 2.

    You can't change the modal state of a form whilst it's loaded, so in the click
    event of the button you would have to include

    Please Login or Register  to view this content.
    Hope this gives you some ideas.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1