WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

userform validation

 
   Home -> Office -> User Forms RSS
Next:  Word 2007 -  
Author Message
O''Dell

External


Since: Mar 05, 2008
Posts: 1



(Msg. 1) Posted: Wed Mar 05, 2008 12:43 pm
Post subject: userform validation
Archived from groups: microsoft>public>word>vba>userforms (more info?)

Hi,

I have a userform with several text and combo boxes. The last object on the
page is an optionbutton. How do I force the user to fill in all the
text/comboboxes before allowing the option button to be selected? The
optionbutton will open another userform and I'd like the first form to be
complete prior to opening the second.

Thanks-
O'Dell
Back to top
Login to vote
fumei via OfficeKB.com

External


Since: Sep 21, 2007
Posts: 24



(Msg. 2) Posted: Wed Mar 05, 2008 8:59 pm
Post subject: Re: userform validation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

This is a logic and design question.

What is an "optionbutton"? Never heard of one. Commandbutton, yes.

"to be selected" - this is part of the logic issue. If what your
optionbutton is, is actually a CommandButton, then you can start your logic
when it executes....not when it is selected.

CommandButton_Click()
check all the stuff needed to check
IF everything OK THEN
open other userform
ELSE
set focus on offending missing whatever
END IF

"How do I force the user to fill in all the text/comboboxes before allowing
the option button to be selected?"

By checking them, and seeing if they are filled in.



O''Dell wrote:
>Hi,
>
>I have a userform with several text and combo boxes. The last object on the
>page is an optionbutton. How do I force the user to fill in all the
>text/comboboxes before allowing the option button to be selected? The
>optionbutton will open another userform and I'd like the first form to be
>complete prior to opening the second.
>
>Thanks-
>O'Dell

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200803/1
Back to top
Login to vote
ODell

External


Since: Mar 05, 2008
Posts: 1



(Msg. 3) Posted: Wed Mar 05, 2008 8:59 pm
Post subject: Re: userform validation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Fumei,
Thanks for your reply.
I have three Optionbuttons (from userform toolbox) in a frame, not a command
button. Only one can be "selected" or chosen. I will apply your advice to
use the "If/Then" logic and see how it goes. One follow up question...how
would I set the focus on an empty text/combo box?

O'Dell

"fumei via OfficeKB.com" wrote:

> This is a logic and design question.
>
> What is an "optionbutton"? Never heard of one. Commandbutton, yes.
>
> "to be selected" - this is part of the logic issue. If what your
> optionbutton is, is actually a CommandButton, then you can start your logic
> when it executes....not when it is selected.
>
> CommandButton_Click()
> check all the stuff needed to check
> IF everything OK THEN
> open other userform
> ELSE
> set focus on offending missing whatever
> END IF
>
> "How do I force the user to fill in all the text/comboboxes before allowing
> the option button to be selected?"
>
> By checking them, and seeing if they are filled in.
>
>
>
> O''Dell wrote:
> >Hi,
> >
> >I have a userform with several text and combo boxes. The last object on the
> >page is an optionbutton. How do I force the user to fill in all the
> >text/comboboxes before allowing the option button to be selected? The
> >optionbutton will open another userform and I'd like the first form to be
> >complete prior to opening the second.
> >
> >Thanks-
> >O'Dell
>
> --
> Message posted via OfficeKB.com
> http://www.officekb.com/Uwe/Forums.aspx/word-programming/200803/1
>
>
Back to top
Login to vote
Doug Robbins - Word MVP

External


Since: Jul 14, 2006
Posts: 5393



(Msg. 4) Posted: Fri Mar 07, 2008 9:55 pm
Post subject: Re: userform validation [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

[Controlname].SetFocus

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"ODell" <ODell RemoveThis @discussions.microsoft.com> wrote in message
news:926D2B18-1B31-4BEA-92BA-2F494B6064B7@microsoft.com...
> Fumei,
> Thanks for your reply.
> I have three Optionbuttons (from userform toolbox) in a frame, not a
> command
> button. Only one can be "selected" or chosen. I will apply your advice
> to
> use the "If/Then" logic and see how it goes. One follow up question...how
> would I set the focus on an empty text/combo box?
>
> O'Dell
>
> "fumei via OfficeKB.com" wrote:
>
>> This is a logic and design question.
>>
>> What is an "optionbutton"? Never heard of one. Commandbutton, yes.
>>
>> "to be selected" - this is part of the logic issue. If what your
>> optionbutton is, is actually a CommandButton, then you can start your
>> logic
>> when it executes....not when it is selected.
>>
>> CommandButton_Click()
>> check all the stuff needed to check
>> IF everything OK THEN
>> open other userform
>> ELSE
>> set focus on offending missing whatever
>> END IF
>>
>> "How do I force the user to fill in all the text/comboboxes before
>> allowing
>> the option button to be selected?"
>>
>> By checking them, and seeing if they are filled in.
>>
>>
>>
>> O''Dell wrote:
>> >Hi,
>> >
>> >I have a userform with several text and combo boxes. The last object on
>> >the
>> >page is an optionbutton. How do I force the user to fill in all the
>> >text/comboboxes before allowing the option button to be selected? The
>> >optionbutton will open another userform and I'd like the first form to
>> >be
>> >complete prior to opening the second.
>> >
>> >Thanks-
>> >O'Dell
>>
>> --
>> Message posted via OfficeKB.com
>> http://www.officekb.com/Uwe/Forums.aspx/word-programming/200803/1
>>
>>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> User Forms All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
 WinRAR
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET