Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default empty clipboard using macro (vb script)

i have workbook a to m, and x

i wrote a macro using vb to...
open workbook a,
then copy information from workbook a to workbook x,
close workbook a,
then repeat the procedure for all workbooks.

but due to the amount of data that every workbooks has,
the windows dialog box will said something like 'do you
want to empty the clipboard' when it's trying to close the
workbook.

how to i automate this so it will empty the clipboard
before it closes the file.

thx.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Location: Portland, Oregon
Posts: 26
Default empty clipboard using macro (vb script)

After the Paste operation use:
Application.CutCopyMode = False
This is supposed to purge the contents of the clipboard.

Also try this:
Application.DisplayAlerts = False
at the beginning of your code and
Application.DisplayAlerts = True
at the end of your code.

--
Toby Erkson
Oregon, USA

"Steve" wrote in message
...
i have workbook a to m, and x

i wrote a macro using vb to...
open workbook a,
then copy information from workbook a to workbook x,
close workbook a,
then repeat the procedure for all workbooks.

but due to the amount of data that every workbooks has,
the windows dialog box will said something like 'do you
want to empty the clipboard' when it's trying to close the
workbook.

how to i automate this so it will empty the clipboard
before it closes the file.

thx.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default empty clipboard using macro (vb script)

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


Steve wrote:
i have workbook a to m, and x

i wrote a macro using vb to...
open workbook a,
then copy information from workbook a to workbook x,
close workbook a,
then repeat the procedure for all workbooks.

but due to the amount of data that every workbooks has,
the windows dialog box will said something like 'do you
want to empty the clipboard' when it's trying to close the
workbook.

how to i automate this so it will empty the clipboard
before it closes the file.

thx.

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
Cannot empty the clipboard Cor Excel Discussion (Misc queries) 5 June 3rd 10 05:30 AM
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
"Cannot empty Clipboard" tiff Excel Worksheet Functions 0 October 10th 05 10:18 PM


All times are GMT +1. The time now is 09:19 AM.

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

About Us

"It's about Microsoft Excel"