
Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
I have tried this code and similar codes. Could you tell me what i am doing
wrong?
Sample Code
Private Sub Dropdown1_Click()
PrimaryDD.AddItem "Professional"
PrimaryDD.AddItem "Leadership"
End Sub
Sub OnExitDropdown1()
Dim oDD As DropDown
Set oDD = ActiveDocument.FormFields("Dropdown2").DropDown
'Clear previous list
oDD.ListEntries.Clear
'Repopulate list based on user selection
Select Case ActiveDocument.FormFields("Dropdown1").Result
Case "A"
With oDD.ListEntries
.Add "Drives For Results"
.Add "Communication"
.Add "Teamwork"
.Add "Buisness Mindset"
End With
Case "B"
With oDD.ListEntries
.Add "Results-Oriented Leader"
.Add "Team Player"
.Add "Inspiring Coach"
.Add "Strategic and Broad Thinker"
End With
End Select
End Sub
> See the bit on cascading listboxes here:
> http://gregmaxey.mvps.org/Populate_UserForm_ListBox.htm
[quoted text clipped - 5 lines]
> > ComboBox. Is this possible in word? If so How? Any help would be
> > welcome.
Greg Maxey - 18 Apr 2007 15:57 GMT
Jeff,
Hard to say what you are doing wrong without an understanding of what
you are trying to do. Your code indicates that you are using a
protected form with dropdown fields. Your original question asked
about comboboxes. Comboboxes don't exist in protected forms.
To get your current code working with two dropdown fields just change
"A" and "B" to "Professional" and "Leadership"
> I have tried this code and similar codes. Could you tell me what i am doing
> wrong?
[quoted text clipped - 51 lines]
>
> - Show quoted text -
Greg Maxey - 18 Apr 2007 16:17 GMT
Jeff,
Dropdown boxes aren't combo boxes. In your current code, change ""A"
and "B" to "Professional" and "Leadership"
> I have tried this code and similar codes. Could you tell me what i am doing
> wrong?
[quoted text clipped - 51 lines]
>
> - Show quoted text -
Jeff - 18 Apr 2007 17:47 GMT
I was trying to use comboboxes. Afteri replied i got it right. I appreciate
your time.
Also, I have a spell check & Print button on my form that wont work when
the document is protected any ideas?
> Jeff,
>
[quoted text clipped - 56 lines]
> >
> > - Show quoted text -
Jonathan West - 18 Apr 2007 19:25 GMT
>I was trying to use comboboxes. Afteri replied i got it right. I appreciate
> your time.
> Also, I have a spell check & Print button on my form that wont work when
> the document is protected any ideas?
How to enable the spellchecker in a protected document
http://www.word.mvps.org/FAQs/MacrosVBA/SpellcheckProtectDoc.htm

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org