Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assign a value to a text box on a Word form

Status
Not open for further replies.

sqleptical

Programmer
Sep 26, 2001
112
US
I'm new to forms in Word & am trying to assign a value in a text box named Deduction depending on the value of the Combo Box named s1. The VBA code below does not work.

If s1 = "Yes" Then
Deduction = "B"
Else
Deduction = "C"
End If

Thanks!
 
FormFields led me to the answer! Thank You!!
Below works:

If ActiveDocument.FormFields("S1").Result = "Yes" Then
ActiveDocument.FormFields("Deduction").Result = "B"
Else
ActiveDocument.FormFields("Deduction").Result = "C"
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top