Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Userform & checkbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Graham - 21 May 2008 09:35 GMT
Hi there

I have a userform and have added a check box to it.  I will have a list of
items to be checked/not checked.   I have a command button on the form to
process the selections.
What code do I need to check whether a check box is ticked or not.?

Thanks in advance for any help.
Graham
Doug Robbins - Word MVP - 21 May 2008 09:55 GMT
The .Value attribute of a checkbox will return True if it is checked and
False if it is not.  Therefore, you would use

If [checkboxname].Value = True Then
   'Code to do what you want to do in this case
Else
   'Code to do what you want do do in thsi case, if any
End if

If you do not need anything done if it is false, you can omit the Else part
of the If...End If construction

You need to replace

[checkboxname]

with the actual name that you have given to the checkbox.

Signature

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

> Hi there
>
[quoted text clipped - 5 lines]
> Thanks in advance for any help.
> Graham
Graham - 21 May 2008 11:33 GMT
Hi Doug

Thanks for that just what I wanted to know.

Graham

> The .Value attribute of a checkbox will return True if it is checked and
> False if it is not.  Therefore, you would use
[quoted text clipped - 23 lines]
> > Thanks in advance for any help.
> > Graham
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.