Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-28-2022, 02:41 AM
hkrawick@gmail.com hkrawick@gmail.com is offline Word Userform is only displaying 1 text value on document and not all that are checked. VBA code? Windows 7 64bit Word Userform is only displaying 1 text value on document and not all that are checked. VBA code? Office 2016
Novice
Word Userform is only displaying 1 text value on document and not all that are checked. VBA code?
 
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
 

Tags
checkboxes, word user form



Similar Threads
Thread Thread Starter Forum Replies Last Post
ms word document text translation using vba code pk_00 Word VBA 1 03-02-2020 03:11 PM
The Word userform checkbox (checked/unchecked) is not saved on the Application Quit matapagi2019 Word VBA 3 03-31-2019 02:29 AM
Word Userform is only displaying 1 text value on document and not all that are checked. VBA code? Creating a letter in Word, with text pulled from an Excel document based on selections in a userform TMAL Word VBA 6 12-15-2017 02:16 PM
Template opens with userform ; non-checked boxes should lead to deletion of corresp paragraphs samszaf Word 1 09-07-2015 09:52 AM
VBA Code in a UserForm module to delete a Command Button which opens the userform Simoninparis Word VBA 2 09-21-2014 03:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft