Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
TonyK TonyK is offline
external usenet poster
 
Posts: 20
Default Enable a ComboBox using VBA

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

--
TonyK
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Enable a ComboBox using VBA

Did you see my revised version of your macro?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



TonyK wrote:
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



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Enable a ComboBox using VBA TonyK Microsoft Word Help 4 July 6th 09 03:01 PM
ComboBox Help Kenny Microsoft Word Help 1 September 22nd 07 01:32 AM
Combobox, listbox, something! Kim K Microsoft Word Help 1 March 2nd 06 10:33 AM
How do I set up a combobox on word? omolano New Users 1 November 10th 05 05:27 AM
combobox Gman1959 Microsoft Word Help 1 January 27th 05 11:16 PM


All times are GMT +1. The time now is 02:06 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"