![]() |
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. |
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. |
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. |
All times are GMT +1. The time now is 08:22 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com