LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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" wrote in message
...
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" wrote in message
...
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,





 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does it clear my clipboard? Jessica P Excel Discussion (Misc queries) 5 March 19th 08 09:14 PM
clear the clipboard? scottnshelly[_36_] Excel Programming 1 June 8th 04 03:58 AM
Clear Clipboard in VB Steve Excel Programming 2 February 26th 04 02:30 PM
Clear Clipboard John McGimpsey Excel Programming 0 February 1st 04 10:14 PM
Clear clipboard Deer Hunter Excel Programming 1 August 4th 03 01:47 PM


All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"