+ Reply to Thread
Results 1 to 4 of 4

Clear Clipboard no longer works

Hybrid View

  1. #1
    David Henderson
    Guest

    Clear Clipboard no longer works

    Please can someone put me right, I have a function to clear the clipboard,
    but if I copy it into a new spreadsheet it comes up with an error, "User
    Defined Type not Defined"
    here is the function
    Function ClearClipboard()
    Dim MyDataObj As New DataObject
    MyDataObj.SetText ""
    MyDataObj.PutInClipboard
    End Function
    Why?
    Thanks in advance
    David



  2. #2
    Dave Peterson
    Guest

    Re: Clear Clipboard no longer works

    From Chip Pearson's site:
    http://cpearson.com/excel/clipboar.htm

    Because these procedures use the DataObject variable type, you must have a
    reference set in your VBA project to the Microsoft Forms 2.0 object library.


    David Henderson wrote:
    >
    > Please can someone put me right, I have a function to clear the clipboard,
    > but if I copy it into a new spreadsheet it comes up with an error, "User
    > Defined Type not Defined"
    > here is the function
    > Function ClearClipboard()
    > Dim MyDataObj As New DataObject
    > MyDataObj.SetText ""
    > MyDataObj.PutInClipboard
    > End Function
    > Why?
    > Thanks in advance
    > David


    --

    Dave Peterson

  3. #3
    David Henderson
    Guest

    Re: Clear Clipboard no longer works

    Thankyou Dave
    hope you get this message
    David
    "Dave Peterson" <[email protected]> wrote in message
    news:[email protected]...
    > From Chip Pearson's site:
    > http://cpearson.com/excel/clipboar.htm
    >
    > Because these procedures use the DataObject variable type, you must have
    > a
    > reference set in your VBA project to the Microsoft Forms 2.0 object
    > library.
    >
    >
    > David Henderson wrote:
    >>
    >> Please can someone put me right, I have a function to clear the
    >> clipboard,
    >> but if I copy it into a new spreadsheet it comes up with an error, "User
    >> Defined Type not Defined"
    >> here is the function
    >> Function ClearClipboard()
    >> Dim MyDataObj As New DataObject
    >> MyDataObj.SetText ""
    >> MyDataObj.PutInClipboard
    >> End Function
    >> Why?
    >> Thanks in advance
    >> David

    >
    > --
    >
    > Dave Peterson




  4. #4
    Dave Peterson
    Guest

    Re: Clear Clipboard no longer works

    Got it.

    David Henderson wrote:
    >
    > Thankyou Dave
    > hope you get this message
    > David
    > "Dave Peterson" <[email protected]> wrote in message
    > news:[email protected]...
    > > From Chip Pearson's site:
    > > http://cpearson.com/excel/clipboar.htm
    > >
    > > Because these procedures use the DataObject variable type, you must have
    > > a
    > > reference set in your VBA project to the Microsoft Forms 2.0 object
    > > library.
    > >
    > >
    > > David Henderson wrote:
    > >>
    > >> Please can someone put me right, I have a function to clear the
    > >> clipboard,
    > >> but if I copy it into a new spreadsheet it comes up with an error, "User
    > >> Defined Type not Defined"
    > >> here is the function
    > >> Function ClearClipboard()
    > >> Dim MyDataObj As New DataObject
    > >> MyDataObj.SetText ""
    > >> MyDataObj.PutInClipboard
    > >> End Function
    > >> Why?
    > >> Thanks in advance
    > >> David

    > >
    > > --
    > >
    > > Dave Peterson


    --

    Dave Peterson

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1