Enable a ComboBox using VBA

T

TonyK

Hi Graham

I thought I had it from your last post. This is my code but it does not
seem to work. This code is run when I select the FormField called
"ClinicType1".
Sub EnableCandABox2()
Dim bEnable As Boolean
Dim Check As String
With ActiveDocument
.FormFields("Specialty").Select
Check = .FormFields("Specialty").Result
If Check = "Children's & Adolescent Services" Then
.Unprotect Password:=""
.FormFields("ClinicType1").Select
With Dialogs(wdDialogFormFieldOptions)
.Enable = bEnable
.Execute
End With
.Protect NoReset:=True, Password:="", Type:=wdAllowOnlyFormFields
End If
End With
End Sub
Any help would be appreciated.
Thanks
 
G

Graham Mayor

Did you see my revised version of your macro?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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