+ Reply to Thread
Results 1 to 10 of 10

Clipboard clear

Hybrid View

Guest Clipboard clear 09-14-2005, 03:05 PM
Guest Re: Clipboard clear 09-14-2005, 03:05 PM
Guest Re: Clipboard clear 09-14-2005, 03:05 PM
Guest Re: Clipboard clear 09-16-2005, 10:05 PM
Guest Re: Clipboard clear 09-17-2005, 04:05 AM
Guest Re: Clipboard clear 09-14-2005, 03:05 PM
Guest Re: Clipboard clear 10-05-2005, 11:05 PM
Guest Re: Clipboard clear 10-24-2005, 01:05 PM
Guest Re: Clipboard clear 10-17-2005, 07:05 PM
Guest Re: Clipboard clear 10-17-2005, 07:05 PM
  1. #1
    G-Force
    Guest

    Re: Clipboard clear

    When I compile the code below (in Access 2003) I get an error at this line :

    OpenClipboard Application.hwnd

    The error I get is "method or data member not found"

    What is causing this ????????


    "RB Smissaert" wrote:

    > Sorry, that should be:
    >
    > Option Explicit
    > Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As
    > Long
    > Private Declare Function CloseClipboard Lib "user32" () As Long
    > Private Declare Function EmptyClipboard Lib "user32" () As Long
    >
    > Sub ClearClipboard()
    > OpenClipboard Application.hwnd
    > EmptyClipboard
    > CloseClipboard
    > End Sub
    >
    > The clipboard has to be opened first and then closed after clearing it.
    >
    > RBS
    >
    >
    >
    > "Reuel" <Reuel@discussions.microsoft.com> wrote in message
    > news:C6DA21DE-9995-4F27-B576-D52A15FF3BF4@microsoft.com...
    > > Is there any way to clear the clipboard in a macro run? I've been having
    > > strange programmatic freezes after a long series of cut/paste/select
    > > operations (see previous post by me) and I thought that it might help
    > > force a
    > > clear of the clipboard periodically.
    > >
    > > Also, can anyone suggest another resource for help when no one inthis
    > > forum
    > > has a suggestion for solving Excel programming problems?
    > > Thanks,
    > >

    >
    >


  2. #2
    Zack Barresse
    Guest

    Re: Clipboard clear

    Try this ...


    Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As
    Long
    Public Declare Function EmptyClipboard Lib "user32" () As Long
    Public Declare Function CloseClipboard Lib "user32" () As Long
    Public Function ClearClipboard()
    OpenClipboard (0&)
    EmptyClipboard
    CloseClipboard
    End Function


    HTH

    --
    Regards,
    Zack Barresse, aka firefytr, (GT = TFS FF Zack)



    "G-Force" <GForce@discussions.microsoft.com> wrote in message
    news:828C4187-BB0B-461F-A054-772F4D2F1C86@microsoft.com...
    > When I compile the code below (in Access 2003) I get an error at this line
    > :
    >
    > OpenClipboard Application.hwnd
    >
    > The error I get is "method or data member not found"
    >
    > What is causing this ????????
    >
    >
    > "RB Smissaert" wrote:
    >
    >> Sorry, that should be:
    >>
    >> Option Explicit
    >> Private Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long)
    >> As
    >> Long
    >> Private Declare Function CloseClipboard Lib "user32" () As Long
    >> Private Declare Function EmptyClipboard Lib "user32" () As Long
    >>
    >> Sub ClearClipboard()
    >> OpenClipboard Application.hwnd
    >> EmptyClipboard
    >> CloseClipboard
    >> End Sub
    >>
    >> The clipboard has to be opened first and then closed after clearing it.
    >>
    >> RBS
    >>
    >>
    >>
    >> "Reuel" <Reuel@discussions.microsoft.com> wrote in message
    >> news:C6DA21DE-9995-4F27-B576-D52A15FF3BF4@microsoft.com...
    >> > Is there any way to clear the clipboard in a macro run? I've been
    >> > having
    >> > strange programmatic freezes after a long series of cut/paste/select
    >> > operations (see previous post by me) and I thought that it might help
    >> > force a
    >> > clear of the clipboard periodically.
    >> >
    >> > Also, can anyone suggest another resource for help when no one inthis
    >> > forum
    >> > has a suggestion for solving Excel programming problems?
    >> > Thanks,
    >> >

    >>
    >>




+ 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