Hi,
I'm trying to define an object for copying from Clipboard.
Dim MyData as DataObject
etc.
But this very first statement (within a procedure) fails:
Compile error: User-defined type not defined
What am I doing wrong? I thought this was a default data type.
Thanks a lot!
The example from MS VB Help follows:
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
Bookmarks