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 / April 2007

Tip: Looking for answers? Try searching our database.

CheckBox Possibilities

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter KNAP - 30 Apr 2007 07:32 GMT
Hi.

When I write code for macro to see if user checked „CheckBox“ for example:

Sub FormSingle()

Set vSingle = ActiveDocument.FormFields(“bkSingle”).CheckBox
    If vSingle.Value = True  Then
        ActiveDocument.Bookmarks(“bkChildrenYes”).Select
    Enf If

End Sub

it Works only when user use for marking appropriate chceckbox keyboard. When
the mouse is used macro do not know that check box has been checked and no
reaction written in it (macro) pass off.

Isn’t it possible to write code the way it will work also when for marking
mouse is used?
Doug Robbins - Word MVP - 30 Apr 2007 07:48 GMT
The following code works whether the keyboard or the mouse is used in both
Word 2000 and Word 2007

With ActiveDocument
   If .FormFields("Check1").CheckBox.Value = True Then
       MsgBox "Checked"
   Else
       MsgBox "Unchecked"
   End If
End With

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.
>
[quoted text clipped - 16 lines]
> Isn't it possible to write code the way it will work also when for marking
> mouse is used?

Rate this thread:






 
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.