|
|
|
|
|
|
Multiple Apps
|
Clear Windows Clipboard
|
|
Ease of Use
|
Easy
|
Version tested with
|
2000, 2002, 2003
|
Submitted by:
|
Zack Barresse
|
Description:
|
This completely clears the contents of Windows Clipboard for all applications.
|
Discussion:
|
Running short on memory? This is a good way to scrape up some free memory space really quick. Especially if you've been doing a large amount of copying/pasting in any Windows setting. This clears ALL clipboard contents.
|
Code:
|
instructions for use
|
Option Explicit
Public Declare Function OpenClipboard Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function EmptyClipboard Lib "user32" () As Long
Public Declare Function CloseClipboard Lib "user32" () As Long
Public Function ClearClipboard()
OpenClipboard (0&)
EmptyClipboard
CloseClipboard
End Function
Sub ccc()
Call ClearClipboard
End Sub
|
How to use:
|
- Select and copy above code (Ctrl + C).
- From Excel, open the Visual Basic Editor (VBE) with Alt + F11.
- Select any file on left, choose Insert-Module from the menu.
- Paste code in right pane (Ctrl + V).
- Close the VBE with Alt + Q.
|
Test the code:
|
- From Excel, run macro 'ccc' by pressing Alt+F8.
|
Sample File:
|
cccEx.zip 6.01KB
|
Approved by mdmackillop
|
This entry has been viewed 208 times.
|
|