Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Word - VBA script to display text on form


Word - VBA script to display text on form

Author
Message
Barry
Barry
Forum God
Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)Forum God (2.4K reputation)

Group: Forum Members
Posts: 7, Visits: 27

I need to create a Word macro/vba script to display text to the right of a form field if a particular field value is select from the list of values. I currently have a script (Dropdown8 is a combo box, Text22 is a text box) that works (below), but only changes the text if, after changing the value in Dropdown8, you tab to another field and then reselect it a second time. Can someone help me to figure out what to do so that it(Text22) is updated each time the value in Dropdown8 is changed?

Code:
Sub Dropdown8_Click()
If ActiveDocument.FormFields("Dropdown8").Result = "Ogallala" Then
ActiveDocument.FormFields("Text22").Result = "SAR Model Needed"
Else
ActiveDocument.FormFields("Text22").Result = " "
End If


Barry

B&W Pantex
Edited
6/29/2009 by Barry
GO



Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search