Results 1 to 2 of 2
  1. #1
    DMT Dave is offline VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,365

    Clear clipboard

    Hi Guy's i found this code on the internet, i am trying to clear clipboard in VBA, when i use DoCmd.RunCommand acCmdpaste

    it is copying an earlier clipboard item

    I admit, i do not understand this code but maybe is there a different method ?

    Module
    Code:
    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


    Private Sub
    Code:
    OpenClipboard (0&)
    EmptyClipboard
    CloseClipboard


  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    I use this code successfully in one of my apps. See http://www.mendipdatasystems.co.uk/s...ain/4594398120
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Copy To Clipboard - Max Length?
    By fredz in forum Access
    Replies: 3
    Last Post: 05-31-2014, 02:03 PM
  2. Import from Clipboard to Access
    By Sami R in forum Access
    Replies: 1
    Last Post: 12-19-2013, 03:51 PM
  3. Using the Clipboard in a Macro in a form
    By mchadwick in forum Forms
    Replies: 8
    Last Post: 06-14-2012, 10:47 AM
  4. Importing from clipboard?
    By mrrrgh in forum Access
    Replies: 5
    Last Post: 04-27-2012, 11:36 AM
  5. Clearing the clipboard with VBA?
    By Simon Sweet in forum Programming
    Replies: 1
    Last Post: 04-17-2008, 03:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums