macro to select drop down

C

ChrisK

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
 
G

Greg Maxey

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



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

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

ChrisK

Thanks thats perfect

Greg Maxey said:
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



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

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org~~~~~~~~~~~~~~~... the list Any ideas? Thanks[/QUOTE] [/QUOTE]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top