View Single Post
 
Old 07-28-2022, 02:41 AM
hkrawick@gmail.com hkrawick@gmail.com is offline Windows 7 64bit Office 2016
Novice
 
Join Date: Jul 2022
Posts: 15
hkrawick@gmail.com is on a distinguished road
Default Word Userform is only displaying 1 text value on document and not all that are checked. VBA code?

I have created a word UserForm that has multiple checkboxes. I want the value of those checkboxes to appear on my word document next to a bookmark value. However, right now only one value is displayed on my document

Dim oCtrl As Control
Dim NeededForms As Range
Set NeededForms = ActiveDocument.Bookmarks("NeededForms").Range

For Each oCtrl In NeededForms1.Controls
If TypeName(oCtrl) = "CheckBox" Then
If oCtrl.Value = True Then
NeededForms.Text = oCtrl.Caption
Exit For
End If
End If
Next
Unload Me
Repaint
End Sub
Reply With Quote