Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / December 2007

Tip: Looking for answers? Try searching our database.

how do i empty the clipboard from within an excel macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
surreyjed - 18 Dec 2007 18:15 GMT
My macro opens a series of files (approx 32) and copies information from them
into the main file, closing the file with the information each time. The
macro works OK, except each time it closes a file it requires manual
intervention- asking if I want to empty the clipboard of the large amounts
data stored in it. I would prefer that the macro automatically emptied the
clipboard without the need for manual input.

-any help please?
Dave Peterson - 18 Dec 2007 18:41 GMT
application.cutcopymode = false

> My macro opens a series of files (approx 32) and copies information from them
> into the main file, closing the file with the information each time. The
[quoted text clipped - 4 lines]
>
> -any help please?

Signature

Dave Peterson

JLGWhiz - 18 Dec 2007 18:52 GMT
Here is a code snippet and the web site it came from.  Dave's solution works
well in regular code where copy and paste actions have occurred.

http://officeone.mvps.org/vba/clear_clipboard.html

Sub ClearClipboard()
   CommandBars.FindControl(Id:=3634).Execute
End Sub

> My macro opens a series of files (approx 32) and copies information from them
> into the main file, closing the file with the information each time. The
[quoted text clipped - 4 lines]
>
> -any help please?
Dave Peterson - 18 Dec 2007 20:35 GMT
That didn't work for me in xl2003.

What was it supposed to do?

In this case, it sounds like the OP was describing the same situation that you
described.

> Here is a code snippet and the web site it came from.  Dave's solution works
> well in regular code where copy and paste actions have occurred.
[quoted text clipped - 13 lines]
> >
> > -any help please?

Signature

Dave Peterson

JLGWhiz - 18 Dec 2007 23:30 GMT
I didn't try it Dave.  I saw it on the MVP web site and it said that the
snippet would clear the clipboard.  Now I have tried it and I think something
was leff out of the information on the web site.  It asked for the object
variable to be set.  I'll look into it and find out what is missing.

> That didn't work for me in xl2003.
>
[quoted text clipped - 20 lines]
> > >
> > > -any help please?
Dave Peterson - 18 Dec 2007 23:46 GMT
I didn't try it in xl2007.  Maybe it's a difference in versions????

> I didn't try it Dave.  I saw it on the MVP web site and it said that the
> snippet would clear the clipboard.  Now I have tried it and I think something
[quoted text clipped - 29 lines]
> >
> > Dave Peterson

Signature

Dave Peterson

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.