Hello! I have a userform with two sections. There are 4 checkboxes in each section with the idea that they will be pre-populated comments that will fill into a textbox. I am able to get it to populate text into the textbox when one box is checked however the way I have it written only allows for one comment to be populated at a time. I need to plan for a scenario where all 4 boxes plus some free hand comments could be added to the textbox. I am sure this can be done but I am struggling to find the answer.
Also - I have 2 sections and 2 textboxes. So the checkboxes need to populate the textbox that they are related to...
Here is what I have so far:
This is the code for one of the checkboxes (this works and is identical for each box but as stated, only allows one to be clicked)
[Private Sub CBParty_Click()
If Me.CBParty.Value = True Then
TXTPayment = "Payment sent to an incorrect party."
Else
TXTPayment = ""
End If
End Sub]
This is what I was trying to do to loop through but I know its not right..
[Private Sub CBChecker_()
Dim c As Control
For Each c In Me.Controls
If TypeName(c) = "CheckBox" Then
If c.Value = True Then
TXTPayment.Value
End If
End If
End Sub]
Thank you in advance for any help you can provide!
Also - I have 2 sections and 2 textboxes. So the checkboxes need to populate the textbox that they are related to...
Here is what I have so far:
This is the code for one of the checkboxes (this works and is identical for each box but as stated, only allows one to be clicked)
[Private Sub CBParty_Click()
If Me.CBParty.Value = True Then
TXTPayment = "Payment sent to an incorrect party."
Else
TXTPayment = ""
End If
End Sub]
This is what I was trying to do to loop through but I know its not right..
[Private Sub CBChecker_()
Dim c As Control
For Each c In Me.Controls
If TypeName(c) = "CheckBox" Then
If c.Value = True Then
TXTPayment.Value
End If
End If
End Sub]
Thank you in advance for any help you can provide!