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 / November 2006

Tip: Looking for answers? Try searching our database.

Yes/No checkbox OR drop down

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rachitm@gmail.com - 29 Nov 2006 21:13 GMT
I have a word document  where there are lots of Yes/No drop down boxes.
Is there a way I could make them default to either of the 2 choices on
the click of a command button (or some other way) ?

Thanks.
Jean-Guy Marcil - 29 Nov 2006 21:37 GMT
rachitm@gmail.com  was telling us:
rachitm@gmail.com nous racontait que :

> I have a word document  where there are lots of Yes/No drop down
> boxes. Is there a way I could make them default to either of the 2
> choices on the click of a command button (or some other way) ?

Try this (Untested):

'_______________________________________
Dim aDoc As Document
Dim ffToReset As FormFields
Dim i As Long

Set aDoc = ActiveDocument
With aDoc.Range
   Set ffToReset = .FormFields
   If ffToReset.Count > 0 Then
       For i = 1 To ffToReset.Count
           Select Case ffToReset(i).Type
               Case wdFieldFormDropDown
                   'Change to 2 if you want the second value
                   ffToReset(i).DropDown.Value = 1
           End Select
       Next
   End If
End With
'_______________________________________

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org


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.