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

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?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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?


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
Where does Ms XL store the clipboard ? or where does MS Windowsstore clipboard ? Subu Setting up and Configuration of Excel 0 May 5th 09 01:20 PM
Clipboard empty but still get waring that clipboard is full Steve Excel Discussion (Misc queries) 0 June 17th 08 09:05 PM
Transfer clipboard from Task pane clipboard(office?) content to Excel (windows?) clipboard? tskogstrom Excel Programming 2 March 6th 07 12:50 PM
Restore clipboard from Task pane clipboard content? tskogstrom Excel Programming 0 January 30th 07 10:48 AM
ClearContents or ClearFormats also clears Clipboard. How can I keep the clipboard? [email protected] Excel Programming 5 December 16th 05 02:30 AM


All times are GMT +1. The time now is 12:20 AM.

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"