Group:  Microsoft Word ยป microsoft.public.word.vba.userforms
Thread: non modal userform

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

non modal userform
"Lina" <tammelina[ at ]hotmail.com> 14.07.2006 07:29:02
Hi!
Can I have a non modal userform but still halt the code to wait for the user
to click one of my buttons on the userform?

I am trying to do a step by step instruction with a userform In one of the
steps I want to ask the user to mark a table and then click ok. My problem
is that to be able to mark something in the document I need to set the
userform to nonmodal but if I do that the code will not stop and wait for
the user to click the okbutton. Is ther some way to make this work or will I
just have to skip my idea and think of another solution.

thanks / Lina


Re: non modal userform
"Jonathan West" <jwest[ at ]mvps.org> 14.07.2006 08:07:52

"Lina" <tammelina[ at ]hotmail.com> wrote in message
news:e0jCvuxpGHA.4684[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text]
> Hi!
> Can I have a non modal userform but still halt the code to wait for the
> user to click one of my buttons on the userform?
>
> I am trying to do a step by step instruction with a userform In one of the
> steps I want to ask the user to mark a table and then click ok. My problem
> is that to be able to mark something in the document I need to set the
> userform to nonmodal but if I do that the code will not stop and wait for
> the user to click the okbutton. Is ther some way to make this work or will
> I just have to skip my idea and think of another solution.
>
> thanks / Lina
>

The call to the modeless UserForm should be the last thing in your routine.

The Click event of the OK button should contain the code that you want to
run afterwards (or be in a separate routine which is called from the Click
event)


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Re: non modal userform
"Lina" <tammelina[ at ]hotmail.com> 17.07.2006 13:25:52
Thanks
"Jonathan West" <jwest[ at ]mvps.org> skrev i meddelandet
news:u7k9yyxpGHA.4116[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
>
> "Lina" <tammelina[ at ]hotmail.com> wrote in message
> news:e0jCvuxpGHA.4684[ at ]TK2MSFTNGP05.phx.gbl...
>> Hi!
>> Can I have a non modal userform but still halt the code to wait for the
>> user to click one of my buttons on the userform?
>>
>> I am trying to do a step by step instruction with a userform In one of
>> the steps I want to ask the user to mark a table and then click ok. My
>> problem is that to be able to mark something in the document I need to
>> set the userform to nonmodal but if I do that the code will not stop and
>> wait for the user to click the okbutton. Is ther some way to make this
>> work or will I just have to skip my idea and think of another solution.
>>
>> thanks / Lina
>>
>
> The call to the modeless UserForm should be the last thing in your
> routine.
>
> The Click event of the OK button should contain the code that you want to
> run afterwards (or be in a separate routine which is called from the Click
> event)
>
>
> --
> Regards
> Jonathan West - Word MVP
> www.intelligentdocuments.co.uk
> Please reply to the newsgroup
> Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net