And yet more questions - this time about checkboxes

J

Jason

1) Is there a beginner's vba list?

2) What's the code for a checkbox in a userform that, when
checked, will populate a formfield checkbox in a
template? When I did it just using bookmarks, it left the
text True, True, False for each response.

3) This last question is more of a bonus question: how
would I get a checkbox in a userform to populate fields
with the text in a userform. For example, a client wants
the ability to select from three bodies of text and then
that text would populate a certain area in a template.

<checkbox> The quick brown realtor jumped over the fence.
<checkbox> The tax attorney jumped over the fence.
<checkbox> The circuit court judge jumped over the fence.

Based on the checkbox clicked, the checkbox and
corresponding text would populate that area in the
template.

TIA,
Jason
 
D

Doug Robbins - Word MVP

Hi Jason,

1 - Yes, microsoft.public.word.vba.beginners. But as your questions are to
do with userforms, the best place would be
microsoft.public.word.vba.userforms

2. If CheckBox1.Value=True Then
ActiveDocument.FormFields("Check1").CheckBox.Value=True
Else
ActiveDocument.FormFields("Check1").CheckBox.Value=False
End if

3. The best thing is to have all of the text in the template with each
pieced enclosed in a bookmark and then depending upon the result of the
relevant checkbox, delete the range of the bookmark if that is what is
wanted.

Question for you. What's the bonus?

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
V

VaviaFla

Jason,

I don't know if you are interested in a program on the market with this
checkbox idea already implemented, but I have been using a program called
Pathagoras which works like a charm. It takes some setup, but will handle 300 +

(or 5) checkboxed items. It does a lot more with forms. URL= www.pathagoras.com

Betty
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top