Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Altoona, Pennsylvania, USA
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Modal Form Interaction (Office 2000, Excel)

    In looking through the archives, I have come tantalizingly close to getting an answer, but not quite.
    I have an Excel macro within which I would like to show a form requesting the user to select several worksheets and then select the "OK" on the form. How do I keep the form floating on top and allow the user to hold the Ctrl key down, select multiple sheets, and then click the "OK" on the form to resume the macro code? Setting the "ShowModal" form property to false seems to work, but the macro code seems to continue on without waiting (is this true?). Creating a While... Wend loop within the macro code to force a wait conditional on a boolean changed by the form "OK" causes the form to display "white" (unpainted) and the application is tied up (hourglass).

    I'm sure this is something programmers do all the time and I'm a little embarrased to ask, but Hey, I'm desparate!

    Any help is greatly appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Modal Form Interaction (Office 2000, Excel)

    The only way I can think of off the top of my head is to write an additional procedure that does nothing but load and show the form, and either put all of your real code into the form module, or call your procedures from there. Hopefully someone else will have a suggestion that doesn't require as much re-work.

  3. #3
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Modal Form Interaction (Office 2000, Excel)

    Could you populate a list box with worksheet names, set the multiselect on and use that instead. It could be part of the existing form or an additional pop-up form.

    Just a thought,

    Andrew C

Posting Permissions

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