GetFromClipboard Not Available

J

Jay

Hi - Office 2003/ WinXP Pro SP2

I'm trying to use VBA code to read text from the Windows clipboard (using
the code below) and I don't seem to have access to the GetFromClipboard and
GetText methods (they don't capitalize when I type them in lower case). I
have forms in my database and my research suggests that I may need to set a
reference to the Microsoft Forms 2.0 Library, but I don't see that as an
option in the VBA Editor |Tools|References| menu. In fact, I don't find
FM20.dll anywhere on my hard drive.

Do I need to set such a reference to 'Forms 2.0' and if so, how do I add it
to my Office installation that has many of the other references installed?

Dim MyData As DataObject
Dim strClip As String

Set MyData = New DataObject
MyData.GetFromClipboard '<<--runtime error: method or data member not found
strClip = MyData.GetText '<<--runtime error: method or data member not found


Thanks,
Jay
 
B

banem2

Hi - Office 2003/ WinXP Pro SP2

I'm trying to use VBA code to read text from the Windows clipboard (using
the code below) and I don't seem to have access to the GetFromClipboard and
GetText methods (they don't capitalize when I type them in lower case).  I
have forms in my database and my research suggests that I may need to seta
reference to the Microsoft Forms 2.0 Library, but I don't see that as an
option in the VBA Editor |Tools|References| menu.  In fact, I don't find
FM20.dll anywhere on my hard drive.  

Do I need to set such a reference to 'Forms 2.0' and if so, how do I add it
to my Office installation that has many of the other references installed?

Dim MyData As DataObject
Dim strClip As String

Set MyData = New DataObject
MyData.GetFromClipboard   '<<--runtime error: method or data member notfound
strClip = MyData.GetText  '<<--runtime error: method or data member not found

Thanks,
Jay

Hi,

In dialog Tools\References click Browse button and add reference
manually by browsing for:

c:\WINDOWS\system32\FM20.DLL

(change drive letter and Windows folder name if needed).

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
J

Jay

Thank you Branislav. I was able to find the FM20.DLL file and your solution
worked perfectly.

Jay
 

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