Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2008

Tip: Looking for answers? Try searching our database.

Making a check box that will automatically put in check when click

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
d.carlin - 18 Feb 2008 23:19 GMT
We are making a form that will be filled out on the internet and must have a
check box that will put a check mark into the box when clicked on.  The
directions from "help" are not making it happen.  The form has been created
and the check boxes added to it, could this be the problem?  How to fix?  
HELP!
Jay Freedman - 19 Feb 2008 00:51 GMT
>We are making a form that will be filled out on the internet and must have a
>check box that will put a check mark into the box when clicked on.  The
>directions from "help" are not making it happen.  The form has been created
>and the check boxes added to it, could this be the problem?  How to fix?  
>HELP!

See http://gregmaxey.mvps.org/Add_Toggle_Objects.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Jen Woodall - 19 Feb 2008 19:53 GMT
I would like to make a form with check boxes that when clicked additional
text appears.  IE. if you click "yes" than instructions for "yes" appear.  
Any tips for this?

> >We are making a form that will be filled out on the internet and must have a
> >check box that will put a check mark into the box when clicked on.  The
[quoted text clipped - 9 lines]
> Microsoft Word MVP        FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
Doug Robbins - Word MVP - 19 Feb 2008 21:43 GMT
Where do you want the instructions to appear?  In the actual document or as
a message box on the screen.  Also what type of form is this?  A document
containing formfields that is protected, or a custom dialog (UserForm).

For the former, say you have a Checkbox to which has been assigned the
bookmark "Check1", if you set a macro containing the following code to be
run on exit from that checkbox (access the Properties dialog of that
formfield to do this), a message will be display when the user checks that
box and exits from it

If ActiveDocument.FormFields("Check1").CheckBox.Value = True Then
   MsgBox "Here is a message."
End If

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I would like to make a form with check boxes that when clicked additional
> text appears.  IE. if you click "yes" than instructions for "yes" appear.
[quoted text clipped - 16 lines]
>> Email cannot be acknowledged; please post all follow-ups to the newsgroup
>> so all may benefit.
Jen Woodall - 19 Feb 2008 22:30 GMT
Thanks, that helps.  I think I almost have it.

> Where do you want the instructions to appear?  In the actual document or as
> a message box on the screen.  Also what type of form is this?  A document
[quoted text clipped - 30 lines]
> >> Email cannot be acknowledged; please post all follow-ups to the newsgroup
> >> so all may benefit.
Jen Woodall - 19 Feb 2008 22:48 GMT
I have set another text form field with a bookmark for the text to appear in.
I am using a protected document and I tried to set up a code for
unprotecting and reprotecting the document.
This is what I've done:
Sub pToggleProtectDoc()
   
   If ActiveDocument.ProtectionType = wdNoProtection Then
       ActiveDocument.Protect
   Else
       ActiveDocument.Unprotect
   End If
   
End Sub
Sub IH()
pToggleProtectDoc

' IH Macro
If ActiveDocument.FormFields("bkIH").CheckBox.Value = True Then
   ActiveDocument.Bookmarks("bkIHadd").Range.Text = "1212 Second Street N.
Cranbrook, BC V1C 4T6"
   
End If
pToggleProtectDoc

End Sub

But it is still telling me that the macros are disabled. ???

> Where do you want the instructions to appear?  In the actual document or as
> a message box on the screen.  Also what type of form is this?  A document
[quoted text clipped - 30 lines]
> >> Email cannot be acknowledged; please post all follow-ups to the newsgroup
> >> so all may benefit.
Doug Robbins - Word MVP - 20 Feb 2008 00:58 GMT
If you insert a textbox type formfield where you have the bookmark, with
that bookmark name being assigned to the formfield, you can use the .Result
attribute of the formfield to load the information into it, which can be
done without unprotecting the document

With ActiveDocument
   If .FormFields("bkIH").CheckBox.Value = True Then
       .FormFields ("bkIHadd").Result= "1212 Second Street N. Cranbrook, BC
V1C 4T6"
   End If
End With

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have set another text form field with a bookmark for the text to appear
>in.
[quoted text clipped - 66 lines]
>> >> newsgroup
>> >> so all may benefit.
Jen Woodall - 20 Feb 2008 15:35 GMT
You are awesome.  Thank-you!
My next question is;

I have a drop down box with an "other" option.  When the other option is
chosen I want a text field to appear.  Is this possible? I guess the first
part could be
If ActiveDocument.FormFields(bk).DropDown.Value = other then
???

> If you insert a textbox type formfield where you have the bookmark, with
> that bookmark name being assigned to the formfield, you can use the .Result
[quoted text clipped - 78 lines]
> >> >> newsgroup
> >> >> so all may benefit.
Doug Robbins - Word MVP - 21 Feb 2008 12:21 GMT
With ActiveDocument
   If .FormFields("Dropdown1").Result = "Other" Then
       .FormFields("Text1").Range.Font.Hidden = False
   Else
       .FormFields("Text1").Range.Font.Hidden = True
   End If
End With

Start with the font of the Text1 formfield formatted as hidden.
Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> You are awesome.  Thank-you!
> My next question is;
[quoted text clipped - 98 lines]
>> >> >> newsgroup
>> >> >> so all may benefit.
Jen Woodall - 21 Feb 2008 17:22 GMT
That works, but when tabbing thru the document I still land on that text
line.  Is there a way to make it skip that one?

> With ActiveDocument
>     If .FormFields("Dropdown1").Result = "Other" Then
[quoted text clipped - 107 lines]
> >> >> >> newsgroup
> >> >> >> so all may benefit.
Doug Robbins - Word MVP - 21 Feb 2008 23:10 GMT
Try

With ActiveDocument
   If .FormFields("Dropdown1").Result = "Other" Then
       .FormFields("Text1").Range.Font.Hidden = False
   Else
       .FormFields("Text1").Range.Font.Hidden = True
       SendKeys "{Tab}"
   End If
End With

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> That works, but when tabbing thru the document I still land on that text
> line.  Is there a way to make it skip that one?
[quoted text clipped - 124 lines]
>> >> >> >> newsgroup
>> >> >> >> so all may benefit.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.