clipboard in excel
Try this:
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()
If OpenClipboard(0&) < 0 Then
EmptyClipboard
CloseClipboard
End If
End Sub
Then when you want to clear the clipboard just do ClearClipboard
RBS
"keri" wrote in message
oups.com...
I have a large piece of code involving copying and pasting LOTS of
data. I have application.cutcopymode = false after each paste line in
my code. However I am viewing the clipboard in excel ina task pane and
can see at the end of the code has 24 items in it.
Is there another way to clear these items so I do not end up with huge
amounts on the clipboard?
|