Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default how do i empty the clipboard from within an excel macro

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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do i empty the clipboard from within an excel macro

application.cutcopymode = false

surreyjed wrote:

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default how do i empty the clipboard from within an excel macro

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



"surreyjed" wrote:

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?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do i empty the clipboard from within an excel macro

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.

JLGWhiz wrote:

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

"surreyjed" wrote:

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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default how do i empty the clipboard from within an excel macro

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.

"Dave Peterson" wrote:

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.

JLGWhiz wrote:

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

"surreyjed" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default how do i empty the clipboard from within an excel macro

I didn't try it in xl2007. Maybe it's a difference in versions????

JLGWhiz wrote:

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.

"Dave Peterson" wrote:

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.

JLGWhiz wrote:

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

"surreyjed" wrote:

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


--

Dave Peterson
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
Clipboard empty but still get waring that clipboard is full Steve Excel Discussion (Misc queries) 0 June 17th 08 09:05 PM
Clipboard empty but get cannot empty CB when trying to copy Peter @ ServiceMaster Excel Worksheet Functions 0 February 22nd 07 03:58 PM
macro help - closing without saving & empty clipboard Bry Excel Discussion (Misc queries) 3 November 23rd 06 02:45 PM
Microsoft Excel can't empty the clipboard Stats777 Excel Discussion (Misc queries) 0 February 15th 06 08:51 PM
empty clipboard using macro (vb script) Steve Excel Programming 2 May 4th 04 06:23 PM


All times are GMT +1. The time now is 03:34 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"