Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 216
Default clearing the clipboard

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
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.


Reply
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
clearing the clipboard [email protected] Excel Discussion (Misc queries) 2 April 25th 07 09:11 AM
clipboard clearing in excel, access, word... troy stud Excel Discussion (Misc queries) 0 October 27th 06 11:02 PM
Excel clearing clipboard [email protected] Excel Programming 1 February 9th 04 03:12 PM
Clearing clipboard Charles Maxson Excel Programming 1 December 1st 03 02:46 PM
Clearing clipboard Gord Dibben Excel Programming 1 November 27th 03 11:37 AM


All times are GMT +1. The time now is 05:32 PM.

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

About Us

"It's about Microsoft Excel"