Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel XP DataObject

Status
Not open for further replies.

vaneagle

Technical User
Apr 23, 2003
71
0
0
AU
Hi,

The following code errors on me in XP. Funny thing is is that it works in Excel 97.

The error it gives is: compile error: User-defined type not defined
Code:
Dim JunkData As New DataObject ' Declare Variable to clear out clipboard


Any ideas? Is there something I need to add in?

regards,

vaneagle
 
The DataObject is part of MSForms.
So you have to reference the Microsoft Forms 2.0 Object Library.
In VBE, Menu Tools -> References...

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Thanks PHV...

I initially had a look for Microsoft Forms 2.0 Object Library but couldn't find it!! So I went to an Excel 97 user and found it straight away. On my pc I actually had to go browsing for the fm20.dll and load it so that it was there.

All is well now. Thanks very much.

vaneagle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top