[mso] Re: Word how to ?

  • From: "Dian Chapman" <dian@xxxxxxxxxxxxx>
  • To: <mso@xxxxxxxxxxxxx>
  • Date: Mon, 15 Sep 2003 23:29:13 -0500

>Can this be done, if so, can you tell me how?

Yes it can be done (HA!...to those of you who have been around here a bit, I
KNOW I sound like a broken record with these types of answers, but think of
how *I* feel...I've been answering these same Qs for over 9
years!<lol>...but, if I understand it correctly, she'll need to use a little
VBA. She should check out my series of AutoForms articles at
www.mousetrax.com/techpage.html#autoforms, where she will find many examples
of how to do various things with forms.

And putting that checkbox into the doc...means she now has a form!

She'll need to click View/Toolbars and turn on the Forms toolbar. There
she'll get her checkbox (NOT the Control Toolbox...those are ActiveX
controls and more sophisticated!). 

Then she'll have to create a macro or two that will check the state of the
checkbox and add/delete whatever fields as needed.

You can give her this code as a sample. Tell her to put one checkbox on a
page, name it "myCheckboxName" (no quotes) and then add this macro code into
the code modules and double click the Checkbox field to add this macro name
into the RUN MACRO ON EXIT field. When the user tabs out of the checkbox,
this code will fire and she'll get a message box to know if it is checked or
not. Anything further...I don't understand what she wants, so you'll either
have to tell us more later after she gets this far. But tell her to read my
articles to see all the things she can do...and if she doesn't know how to
use this code in a code module, tell her to read this article:

Sharing Macros
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=166

'*********************
Sub GetCheckBoxValue()
    Dim boolCheckValue As Boolean

    boolCheckValue =
ActiveDocument.FormFields("myCheckboxName").CheckBox.Value

    If boolCheckValue = True Then
        MsgBox "The box is checked"
        'do something like show field
    Else
        MsgBox "The box is NOT checked"
        'do something, like delete field
    End If
End Sub
'*********************

Dian D. Chapman
Technical Consultant, 
Microsoft MVP & Instructor

Free Tutorials: www.mousetrax.com/techtrax
Free Word Tips & Tricks eBook: www.mousetrax.com/books.html
Learn VBA the easy way, thru video! www.mousetrax.com/techcourses.html

  


-----Original Message-----
From: mso-bounce@xxxxxxxxxxxxx [mailto:mso-bounce@xxxxxxxxxxxxx] On Behalf
Of Jim
Sent: Monday, September 15, 2003 9:37 PM
To: mso@xxxxxxxxxxxxx
Subject: [mso] Word how to ?

Here's a question my wife came up with, and of course me not being a word
expert I figured I'd post and see who is!.

She has a table
in one column she wants a 'CheckBox' in each of the cells when the check box
is checked she wants TWO other entries fields (UserID, Date) appear in that
cell that must be completed before the user can leave that cell.
she doesn't want those two fields to appear if the box is NOT checked.

Can this be done, if so, can you tell me how?

Thanks

-Jim-



*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to mso-request@xxxxxxxxxxxxx
with the word "unsubscribe" (without the quotes) in the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also
allow you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation
with instructions.  Once you are a member of the files group, you can go
here to upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: