PDA

View Full Version : [SOLVED:] Linking listbox selection in userform to variables in document text



Maya55
01-22-2020, 09:02 AM
I have created a userform that contains, among other things, a yes/no listbox. When the user selects "yes" in response to the question in the userform, I need a specific sentence/paragraph to be automatically inserted into a specific place in the document body once the 'Populate Document" button is pressed. When the user selects "no", I need no changes to be made to the document text. What code can I use to make this happen? (I am an extreme newbie).

Not sure if this will be relevant, but I have been using document variables to auto-populate other portions of the document from the userform.

Thanks in advance!

gmaxey
01-22-2020, 09:19 AM
You are going to need a conditional field in the document if you want to stick with using document variables:
{ If { DocVariable "YesNo" } = "Yes""Now is the time for all good men.""" }

Maya55
01-22-2020, 02:38 PM
That worked! Thanks so much, Greg!