title: Copy text from a textbox to clipboard
body: <p>I am trying to copy text from a Text Box to the clipboard.</p>
  <pre><code>Private Sub CommandButton1_Click()
      With New MSForms.DataObject
          .SetText TextBox1.Text
          .PutInClipboard
      End With
  End Sub
  </code></pre>
  <p>I get</p>
  <blockquote>
  <p>&quot;Run-time error '424' Object required.</p>
  </blockquote>
  <p>Debugging causes <code>.setText TextBox1.Text</code> to highlight and say &quot;MyData &lt;Object variable or with block variable not set&quot;.</p>