Userform check boxes and re-usability

G

Guest

Two questions re: userforms (I'm using one to input information from
textboxes collected on the userform and placing it into bookmarks of a Word
document/template)

1. Is there a way to have a check box on a userform "check" a check box on a
Word document/template? I can get it to say true on the Word document but
not actually "check" it off.

2. I'm also looking to re-use the responses from one document (gathered from
a userform) in another document. I'm not sure whether I should try to do it
through a userform or directly from the document (through a cross-reference
perhaps?) The userform would be more useful since I'd ideally like to review
all the inputs and change some of the responses potentially.

I hope that this is clear. Let me know what isn't--I'm using Word 2003.

Thanks!
 
C

Cindy M.

Hi =?Utf-8?B?QW5keQ==?=,
Two questions re: userforms (I'm using one to input information from
textboxes collected on the userform and placing it into bookmarks of a Word
document/template)
Note that the word.vba.userforms newsgroup (or word.vba.general) would be the
better bet for a "macro" question. This group is mostly end-users...
1. Is there a way to have a check box on a userform "check" a check box on a
Word document/template? I can get it to say true on the Word document but
not actually "check" it off.
Probably. But it depends on what kind of checkbox. How did you insert the
checkbox into the document?
2. I'm also looking to re-use the responses from one document (gathered from
a userform) in another document. I'm not sure whether I should try to do it
through a userform or directly from the document (through a cross-reference
perhaps?) The userform would be more useful since I'd ideally like to review
all the inputs and change some of the responses potentially.
Hard to answer without more information about the relationship between the two
documents and how they'll be used.
I hope that this is clear. Let me know what isn't--I'm using Word 2003.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
G

Guest

Thanks for the newsgroup tip.

1. I inserted the check box from the Forms toolbar but I could insert it
through the Control toolbox if that works better.

2. Let me see if I can clarify what the need is: I have a userform
associated with a template that collects Name and address and inputs it into
a word document in the right spot(s). Now I bring up another Word file where
I want to re-use that same name and address without having to re-input it.
Can it somehow connect to the other Word document saving me the time to
re-input the same information?

2a. Or even better, bring up the name/address from the previous document so
I can double check it on a userform and make a change (if necessary) for the
new document. If I can't do this, then hopefully I can do at least step 2.

Does this help?

Thanks.
 
C

Cindy M.

Hi =?Utf-8?B?QW5keQ==?=,
1. I inserted the check box from the Forms toolbar but I could insert it
through the Control toolbox if that works better.
No, a Forms checkbox should be just fine...

Private Sub CheckBox1_Click()
ActiveDocument.FormFields("nameOfField").CheckBox.Value _
= Me.CheckBox1.Value
Application.ScreenRefresh
'lets the user see the change in "real time"
End Sub
2. Let me see if I can clarify what the need is: I have a userform
associated with a template that collects Name and address and inputs it into
a word document in the right spot(s). Now I bring up another Word file where
I want to re-use that same name and address without having to re-input it.
Can it somehow connect to the other Word document saving me the time to
re-input the same information?

2a. Or even better, bring up the name/address from the previous document so
I can double check it on a userform and make a change (if necessary) for the
new document. If I can't do this, then hopefully I can do at least step 2.
When you're at this point, is the first document still open? If yes, it
shouldn't a big problem. You can pick it out of the Documents collection (you
just have to find some way to uniquely identify this kind of document) and
access the FormFields collection.

If the document will be closed, then you'd want to write the information to some
kind of text file and read it from the text file.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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