Hey royUK .
I did check your work first.
This UserForm is supposed to be a simple user form in creating a "Note Generator" for work. I thought having this would give me an easier time at work.
I have 2 columns of check boxes because I want 1 column for Documents Received and 1 column for Documents Needed (To be requested). This way, I would have a sort of checklist of what I need to ask from clients. So, in a sense, it is very important for me to have 2 columns.
For the combo box, I admit I am unsure if this is right "function" to use here. I am not gonna do multiple selection, I will only choose one from the list. As I stated above, upon selecting an option from the box, I want that same text be displayed on textboxt1 along with another 2-liner.
For the copy, I only want it on my clipboard and I'll post it somewhere in my system (outside excel) like Notepad or something. The below is my code for copying the text. Correct me if I am wrong.
- ' ' Copy Text from TextBox
- Private Sub CommandButton1_Click()
- With New MSForms.DataObject
- .SetText TextBox1.Text
- .PutInClipboard
- End With
- End Sub
Since I am a newbie in this. I thought the code of Justin Doward is "easier" for me to understand. Though, I have only tested the checkboxes for now. With that, I want to add another query here. I have this code so far:
- Private Sub CheckBox1_Click()
- Me.TextBox1.Text = vbNullString
-
- If Me.CheckBox1.Value = True Then
- Me.TextBox1 = Label1.Caption & vbNewLine & "• " & CheckBox1.Caption
- End If
-
- End Sub
- Private Sub CheckBox2_Click()
-
- If Me.CheckBox2.Value = True Then
- Me.TextBox1.Text = Me.TextBox1.Text & vbNewLine & "• " & CheckBox2.Caption
- End If
- End Sub
Display More
My problem here is, after un-ticking check box 2, it is not "removed" on the textbox. It stays on the textbox and when I click again on the same checkbox, the same texts was doubled. I added the below code on Checkbox2, but it didn't do any better.
- Me.TextBox1.Text = vbNullString