markda2000
New Member
- Joined
- Mar 24, 2011
- Messages
- 9
Hi,
I have a user form that will paste to clipboard the entries from the user form when a button in pressed. However it only shows the value of checkboxs being true or false which does not read easily (the purpose of the form is to paste into customer service advisors notes).
Is there anyway to have the copied item display text if the checkbox is checked and nothing if not. I guess I need to be using the IF function but I cannot get it to work.
Part of the code I have is below
Sorry if this seems basic but I am very new at VBA
I have a user form that will paste to clipboard the entries from the user form when a button in pressed. However it only shows the value of checkboxs being true or false which does not read easily (the purpose of the form is to paste into customer service advisors notes).
Is there anyway to have the copied item display text if the checkbox is checked and nothing if not. I guess I need to be using the IF function but I cannot get it to work.
Part of the code I have is below
Code:
Private Sub SaveNotesButton_Click()
Dim notestosendtoclipboard As String
Dim textobj As DataObject
Set textobj = New DataObject
notestosendtoclipboard = "Paying by direct debit " & PayingByDD.Value
textobj.SetText notestosendtoclipboard
textobj.PutInClipboard
End Sub
Sorry if this seems basic but I am very new at VBA