No DataObject in Excel VBA macro

4

4EYES

Hi people,

I was working on some Excel macro's in Office 2004 for the Mac, where
had some trouble with the clipboard. As I understand, the Mac clipboar
is a lot harder to empty than the Windows version (wher
'Application.CutCopyMode = False' suffices).

I got some code to fix this from 'this site
(http://www.mcgimpsey.com/macoffice/excel/clearclipboard.html), bu
that does not seem to work without the availability of DataObject. Thi
object seems to be in the Microsoft Forms 2.0 library, but that's no
available.

Can someone help me out here? Thanks in advance
 
4

4EYES

Hi Hilena.

Thanks for the interest, but no, I haven't gotten it to work... Th
macro is still stuck on the line: Dim myDO As DataObject. As I foun
out through some internet searches, this seems to be in the Microsof
Forms 2.0 library.

Somewhere, it was also suggested to create a new UserForm, check it
references, and delete the form again to get the MS Forms library t
show up in the list, but that also didn't do the trick...

If you or anyone else has any idea how to tackle this problem, pleas
let me know
 
J

JE McGimpsey

4EYES said:
Thanks for the interest, but no, I haven't gotten it to work... The
macro is still stuck on the line: Dim myDO As DataObject. As I found
out through some internet searches, this seems to be in the Microsoft
Forms 2.0 library.

Somewhere, it was also suggested to create a new UserForm, check its
references, and delete the form again to get the MS Forms library to
show up in the list, but that also didn't do the trick...

The

Microsoft Forms 2.0 Object Library

should be listed in the list of references in the References dialog when
you choose Tools/References in the Visual Basic Editor. For me, it's
the 4th library from the top. References are project specific, so make
sure your project is selected before choosing Tools/References. The
Forms library checkbox should be checked by default. Check it if it's
not.

The library normally lives in the

HD:Applications:Microsoft Office 2004:Office:Visual Basic for
Applications

file. Make sure that's still present (that file also contains the Visual
Basic for Applications library and the Microsoft Visual Basic for
Applications Extensibility library), and at the appropriate version
(11.2 if you've applied SP2).
 
4

4EYES

JE said:
The

Microsoft Forms 2.0 Object Library

should be listed in the list of references in the References dialo
when
you choose Tools/References in the Visual Basic Editor. For me, it's
the 4th library from the top. References are project specific, so make
sure your project is selected before choosing Tools/References. The
Forms library checkbox should be checked by default. Check it if it's
not.

The library normally lives in the

HD:Applications:Microsoft Office 2004:Office:Visual Basic for
Applications

file. Make sure that's still present (that file also contains th
Visual
Basic for Applications library and the Microsoft Visual Basic for
Applications Extensibility library), and at the appropriate version
(11.2 if you've applied SP2).

Thanks for the reply. I checked Tools/References again, and it'
definitely not there, although the other two libraries you mention ar
listed. Those indeed refer to the file you mention, and the file is a
the location you specified (version 11.2.0). My version of Office i
fully up-to-date.

Pretty weird altogether..
 
K

Kacprowicz

Were you ever able to resolve this issue, because I am having exactly
the same problem with a Word VBA macro? In fact, it worked previously,
and now all of sudden it keeps erroring out saying the DataObject
object is not a user-defined type. As you experienced, I cannot find
the MS Forms 2.0 Object Library in the Reference List.

Any advice and/or input is appreciated!
 
4

4EYES

Kacprowicz said:
Were you ever able to resolve this issue, because I am having exactly
the same problem with a Word VBA macro? In fact, it worked previously,
and now all of sudden it keeps erroring out saying the DataObject
object is not a user-defined type. As you experienced, I cannot find
the MS Forms 2.0 Object Library in the Reference List.

Any advice and/or input is appreciated!
Hi, it's been some time since the original problem, but I believe
skipped the DataObject from my code alltogether...

However, I did check the excel file I was working on back then, an
somehow the reference to the MS Forms 2.0 Object Library is there now
I checked Word, and it's also there.

Now I'm wondering how it got there... Would moving the file back an
forth to a Windows system make a difference? On that system, I am sur
the library was available at the time, and I probably selected it..
It's a long shot, but maybe it's worth a try.

Sorry I don't have a clearer answer..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top