Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Chicago, Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Modal Userforms (VB6 SP5)

    Hello all,

    I'd like to set the modality of a userform. I want to get input from a user before continuing on in the proceedure. This is a snap in VBA. How do I do it in VB6?

    Thanks in advance,
    Rex

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modal Userforms (VB6 SP5)

    In the object browser, search for Modal, and look at the entries that apply to VB.

  3. #3
    New Lounger
    Join Date
    Jan 2001
    Location
    Chicago, Illinois, USA
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modal Userforms (VB6 SP5)

    Thanks! That did the trick.

    Rex

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Modal Userforms (VB6 SP5)

    Just be aware than in VB, you can only have one modal form visible at a time. You can't stack them the way you can in VBA.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Flims, Switzerland
    Posts
    271
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Modal Userforms (VB6 SP5)

    to show a modal form just use

    <pre>frmModal.Show 1</pre>


    a value of 1 passed to Show() will show the form modal, a value of 0 will show it non-modal

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Modal Userforms (VB6 SP5)

    It's easier to read (and remember) if you use the VB constants vbModal and vbModeless to specify modality rather than the numbers.
    Charlotte

Posting Permissions

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