Check Boxes, Userforms Bookmarks 
Author Message
 Check Boxes, Userforms Bookmarks

Similar to the message posted by James Adams on 25/8/2000 I also have a
userform with check boxes on it.

The document has check box form fields on it which correspond to the check
boxes on the userform.

I would like to be able to place a tick in a checkbox on the userform, then
when the userform is closed a cross is placed in a particular check box form
field on the document.

Any help is much appreciated

Many thanks

Peter Moore



Fri, 14 Feb 2003 14:33:42 GMT  
 Check Boxes, Userforms Bookmarks
Hi Peter,

You can use:

ActiveDocument.FormFields("Check1").CheckBox.Value = True

to set the check mark in the checkbox.

If you want to avoid having the document protected as you will require to do
if you use formfields in it, you could use the following code instead:

    Range.InsertSymbol Font:="Wingdings", CharacterNumber:=-3842,
Unicode:=True

Please post any follow-up or new questions to the Newsgroups so that others
may benefit therefrom or contribute thereto.

Hope this helps,
Doug Robbins - Word MVP

Quote:
> Similar to the message posted by James Adams on 25/8/2000 I also have a
> userform with check boxes on it.

> The document has check box form fields on it which correspond to the check
> boxes on the userform.

> I would like to be able to place a tick in a checkbox on the userform,
then
> when the userform is closed a cross is placed in a particular check box
form
> field on the document.

> Any help is much appreciated

> Many thanks

> Peter Moore



Fri, 14 Feb 2003 03:00:00 GMT  
 Check Boxes, Userforms Bookmarks

Quote:
> If you want to avoid having the document protected as you will require to
do
> if you use formfields in it, you could use the following code instead:

>     Range.InsertSymbol Font:="Wingdings", CharacterNumber:=-3842,
> Unicode:=True

Doug, thanks for the tip. I have a document with 75 checkboxes, all on one
sheet. The notion of protecting the sheet was troublesome, but that's what I
was going to do. This is a good workaround using bookmarks instead of
FORMTEXT.

Jim Adams
Maysville KY (USA)



Sat, 15 Feb 2003 03:00:00 GMT  
 Check Boxes, Userforms Bookmarks

Doug, I spoke too soon. I don't know the proper syntax to make this work.
The checkbox on the form is "Checkbox1"
and the Bookmark in the document is "CheckMe."
I've tried
ActiveDocument.Bookmarks("CheckMe").Range.InsertSymbol
Font:="Winddings",CharacterNumber:=3842,Unicode:=True

I know that I need to indicate that the value of the form's checkbox = true,
but I'm not sure how to do this without an
If..then syntax, which would be very cumbersome for 75 checkboxes and
bookmarks.

Thanks
--
Jim Adams
Maysville, KY (USA)



Sat, 15 Feb 2003 03:00:00 GMT  
 Check Boxes, Userforms Bookmarks
Hi James,

If you have 75 CheckBoxes on the UserForm named CheckBox1 to Checkbox75,
with corresponding bookmarks in the document named CheckMe1 to CheckMe75,
then the following will work:

----------------------------------------------------------------

Dim i As Long

For i = 1 To 75

    If Me.Controls("CheckBox" & i).Value = True Then

        ActiveDocument.Bookmarks("CheckMe" & i). _
            Range.InsertSymbol _
                Font:="Wingdings", _
                CharacterNumber:=-3842, _
                Unicode:=True

    End If
Next i

----------------------------------------------------------------

Hope this helps.
ibby

Please post replies or follow-ups to the **newsgroup** so that participants
may benefit or contribute.

Quote:
> Doug, I spoke too soon. I don't know the proper syntax to make this work.
> The checkbox on the form is "Checkbox1"
> and the Bookmark in the document is "CheckMe."
> I've tried
> ActiveDocument.Bookmarks("CheckMe").Range.InsertSymbol
> Font:="Winddings",CharacterNumber:=3842,Unicode:=True

> I know that I need to indicate that the value of the form's checkbox =
true,
> but I'm not sure how to do this without an
> If..then syntax, which would be very cumbersome for 75 checkboxes and



Sun, 16 Feb 2003 03:00:00 GMT  
 Check Boxes, Userforms Bookmarks
Ibby, thanks so much. What a timesaver. I'm trying to figure out the logic
behind the code so I can learn from this.
I'm sure others will find it helpful also.
--
Jim Adams
Maysville, KY


Quote:
> Hi James,

> If you have 75 CheckBoxes on the UserForm named CheckBox1 to Checkbox75,
> with corresponding bookmarks in the document named CheckMe1 to CheckMe75,
> then the following will work:

> ----------------------------------------------------------------

> Dim i As Long

> For i = 1 To 75

>     If Me.Controls("CheckBox" & i).Value = True Then

>         ActiveDocument.Bookmarks("CheckMe" & i). _
>             Range.InsertSymbol _
>                 Font:="Wingdings", _
>                 CharacterNumber:=-3842, _
>                 Unicode:=True

>     End If
> Next i



Sun, 16 Feb 2003 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Userforms - Check Boxes

2. Word Bookmarks, Userforms and Updates

3. Bookmarks, References and Userforms

4. userforms for bookmarks

5. UserForms, Textboxes & Bookmarks

6. bookmarks & userforms

7. Bookmarks in userforms, how do you populate more then one place

8. Help with Bookmarks and userforms

9. two questions on how to get data entries in userforms into bookmarks (if possible at all)

10. Userforms - TextBox with spell checking as you type?

11. Converting Dialog Boxes to UserForms

12. Converting Word 6.0 Dialog Boxes into Word2000 UserForms

 

 
Powered by phpBB® Forum Software