| Part | Description | |
| object | Required. A valid object name. | |
Dim MyData as DataObject
Private Sub CommandButton1_Click()
    'Need to select text before copying it to Clipboard
    TextBox1.SelStart = 0
    TextBox1.SelLength = TextBox1.TextLength
    TextBox1.Copy
    MyData.GetFromClipboard
    TextBox2.Text = MyData.GetText(1)
End Sub
Private Sub UserForm_Initialize()
    Set MyData = New DataObject
    TextBox1.Text = "Move this data to the Clipboard, to a DataObject," _
        & " then to TextBox2!"
End Sub