Trying to use the Clipboard class in the VB object library

  • Thread starter Thread starter Conan Kelly
  • Start date Start date
C

Conan Kelly

Hello all,

Using MS Office XP on Win XP Pro

I'm using info from a sample program that my prof. was walking us through in my Programming Fundamentals class several years ago.

I set a reference to the "Visual Basic objects and procedures" library (c:\Program Files\Microsoft Visual Studio\VB98\VB6.OLB) in
Access's VBA. When I try to do something like this:

sub testing()
msgbox Clipboard.getText
end sub

VBA/Access locks up (MS's Error Reporting w/option to repair and reopen my current DB).

What is wrong here? Will this library not play nicely with VBA?
 
Allen,

Thanks for the feedback.

I'll save this post and look this up if I need it in the future. I found a better workaround than what I was trying to do.

Thanks again,

Conan




Allen Browne said:
Conan, most of us eschew the extra libraries because of the hassles it causes with references.

You can use an API call to manipulate the clipboard, and it will work reliably with any version. Details in:
http://allenbrowne.com/func-07b.html
 
Back
Top