S
SGT Buckeye
Can someone look at this code and tell me why it won't work? What I
want to do is create a dropdown list in the Form Field called
"Deduction1" if anything is typed into the Form Field called "CLS1".
Sub CascadeList()
If ActiveDocument.FormFields("CLS1").TextBox.Value = 0 Then
ActiveDocument.FormFields("Deduction1").DropDown.ListEntries.Clear
Exit Sub
End If
Select Case ActiveDocument.FormFields("CLS1").Result
Case "*"
With
ActiveDocument.FormFields("Deduction1").DropDown.ListEntries
.Clear
.Add "A1"
.Add "A2"
.Add "A3"
.Add "A4"
.Add "A5"
.Add "A6"
.Add "A7"
.Add "A8"
.Add "A9"
.Add "B1"
.Add "B2"
.Add "B3"
.Add "B4"
.Add "B5"
.Add "B6"
.Add "B7"
.Add "B8"
.Add "C1"
.Add "C2"
.Add "C3"
.Add "C4"
.Add "D1"
.Add "E1"
.add "F1"
.Add "F2"
.Add "F3"
.Add "G1"
.Add "G2"
.Add "G3"
.Add "G4"
.Add "G5"
End With
End Select
End Sub
Any help is appreciated.
want to do is create a dropdown list in the Form Field called
"Deduction1" if anything is typed into the Form Field called "CLS1".
Sub CascadeList()
If ActiveDocument.FormFields("CLS1").TextBox.Value = 0 Then
ActiveDocument.FormFields("Deduction1").DropDown.ListEntries.Clear
Exit Sub
End If
Select Case ActiveDocument.FormFields("CLS1").Result
Case "*"
With
ActiveDocument.FormFields("Deduction1").DropDown.ListEntries
.Clear
.Add "A1"
.Add "A2"
.Add "A3"
.Add "A4"
.Add "A5"
.Add "A6"
.Add "A7"
.Add "A8"
.Add "A9"
.Add "B1"
.Add "B2"
.Add "B3"
.Add "B4"
.Add "B5"
.Add "B6"
.Add "B7"
.Add "B8"
.Add "C1"
.Add "C2"
.Add "C3"
.Add "C4"
.Add "D1"
.Add "E1"
.add "F1"
.Add "F2"
.Add "F3"
.Add "G1"
.Add "G2"
.Add "G3"
.Add "G4"
.Add "G5"
End With
End Select
End Sub
Any help is appreciated.