K
KHogwood-Thompson
Hi,
I have a template form in word that when opened shows the user a Userform to
complete. This form has several text boxes and several check boxes. I have
the following code, activated from the OK command button, to fill in the text
boxes based on the text keyed in to the Userform by the user:
Private Sub OK_Click()
With ActiveDocument
.Bookmarks("To").Range _
.InsertBefore ToTextBox
.Bookmarks("From").Range _
.InsertBefore FromTextBox
.Bookmarks("Subject").Range _
.InsertBefore SubjectTextBox
.Bookmarks("Text").Range _
.InsertBefore TextTextBox
End With
MemoDetails.Hide
End Sub
This works fine, the problem I have is filling in the check boxes on the
form based upon the checkboxes completed in the UserForm. Can someone assist
me with the coding. Here are the details:
Userform fields
ForInfoCheckBox
ForSafetyCheckBox
ForYellowCheckBox
Bookmarks on Word Form:
Check1
Check2
Check3
PS It is possible that more than one of the boxes is ticked.
Many thanks
I have a template form in word that when opened shows the user a Userform to
complete. This form has several text boxes and several check boxes. I have
the following code, activated from the OK command button, to fill in the text
boxes based on the text keyed in to the Userform by the user:
Private Sub OK_Click()
With ActiveDocument
.Bookmarks("To").Range _
.InsertBefore ToTextBox
.Bookmarks("From").Range _
.InsertBefore FromTextBox
.Bookmarks("Subject").Range _
.InsertBefore SubjectTextBox
.Bookmarks("Text").Range _
.InsertBefore TextTextBox
End With
MemoDetails.Hide
End Sub
This works fine, the problem I have is filling in the check boxes on the
form based upon the checkboxes completed in the UserForm. Can someone assist
me with the coding. Here are the details:
Userform fields
ForInfoCheckBox
ForSafetyCheckBox
ForYellowCheckBox
Bookmarks on Word Form:
Check1
Check2
Check3
PS It is possible that more than one of the boxes is ticked.
Many thanks