View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Frank Kabel Frank Kabel is offline
external usenet poster
 
Posts: 3,885
Default clearing the clipboard

Hi
have a look at
http://tinyurl.com/3yoqc


Try for example the following code:

Public Declare Function OpenClipboard Lib "user32" ( _
ByVal hwnd AsLong) 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





--
Regards
Frank Kabel
Frankfurt, Germany
"mike" schrieb im Newsbeitrag
...
I have a macro that is supposed to write a subtotal to a
new line. However, it sometimes writes a line with
previous data.

Our latest attempt to correct this issue concerns the
clipboard. Is it possible the clipboard is not getting
cleared and writing the same information again?

Any suggestions on how to clear the clipboard would be
appreciated or how to verify that this is the problem
would also help.

I tried to record a macro pushing the clear all on the
clipboard toolbar but that did not work. Thanks.