Consulting

Results 1 to 2 of 2

Thread: Hide all userforms that are open

  1. #1
    VBAX Tutor
    Joined
    Oct 2007
    Posts
    210
    Location

    Hide all userforms that are open

    Is there a way to do this? I have points in my program where I don't know which ones are shown.
    "The amount of stupid people in the world is God's way of punishing the smart people" - protean_being

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    There is a problem here.

    The (active) userforms are part of a collection, which you can iterate trough and get each collection member.

    When you go through the collection, you will iterate in the order that they are created. If you show the forms modally, then trying to hide the next form may fail because you have to hide the topmost modal form first.

    It would be far better to keep track of which forms are active rather than relying on a mop-up method.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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