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 / March 2008

Tip: Looking for answers? Try searching our database.

macro to select drop down

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ChrisK - 23 Mar 2008 14:27 GMT
Can anyone suggest a macro for a check box to select a drop down box field

I have a check box labeled "insp" When it is checked upon exit it runs a
macro that hides a paragraph of text(which works fine) but I also need the
macro to pick dropdown4 and select its 5th choice on the list

Any ideas?
Thanks
Greg Maxey - 23 Mar 2008 14:51 GMT
You will need to run a macro on exit from "insp" :

Sub OEChkbox()
Select Case True
 Case ActiveDocument.FormFields("insp").Result
   ActiveDocument.FormFields("Dropdown4").DropDown.Value = 5
 Case Else
   ActiveDocument.FormFields("Dropdown4").DropDown.Value = 1 'or whatever
you want selected if the checkbox isn't checked.
End Select
End Sub

Signature

~~~~~~~~~~~~~~~~~~~~~~~~~~~
Greg Maxey -  Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> Can anyone suggest a macro for a check box to select a drop down box
> field
[quoted text clipped - 6 lines]
> Any ideas?
> Thanks
ChrisK - 23 Mar 2008 15:13 GMT
Thanks thats perfect

> You will need to run a macro on exit from "insp" :
>
[quoted text clipped - 18 lines]
> > Any ideas?
> > Thanks

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.