ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Clipboard question (https://www.excelbanter.com/excel-programming/293611-clipboard-question.html)

aj

Clipboard question
 
The following code came from a post yesterday about
clearing the clipboard.

Public Declare Function OpenClipboard Lib "user32" (_
ByVal Hwnd As Long) As Long

Public Declare Function CloseClipboard Lib "user32" () As
Long

Public Declare Function EmptyClipboard Lib "user32" () As
Long

Sub ClearClipboard()
OpenClipboard (0&)
EmptyClipboard
CloseClipboard
End Sub

I declared the functions with the rest of the public
variables and created a module for the sub ClearClipboard.

After I copied data, I called the ClearClipboard sub (to
clear the Office Clipboard and received the following
error message:

Can't find DLL entry point OpenClipboard in User 32

Any help on what I'm doing wrong would be GREATLY
appreciated. Thanks for the help.


All times are GMT +1. The time now is 11:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com