Do you ever think or need to clear/empty Clipboard Excel?
I have a big Excel file which abusing the power of copy and paste to format the data and formula. I prefer to update the formula once, then save the result as values, especially for lookup formula. If I am not doing this, each time I am changing something, it will trigger the lookup formula and make the Excel freeze a few minutes.
The down side of the approach, after several hours, Excel will become slower and slower. It’s look like after extensive abuse of copy and paste, the memory will full of data and slower the Excel application.
Fortunately, after applying empty clipboard Excel using VBA macro, the Excel application keep running smoothly until the end of the day.
There are two ways to clear Excel clipboard using VBA.
1. Empty Clipboard Excel Using Excel Application properties
Application.CopyObjectsWithCells = False
2. Empty Clipboard Excel Using Windows Empty Clipboard function
Public Declare Function OpenClipboard Lib "user32" ( _ ByVal NewOwner As Long) As Boolean Public Declare Function EmptyClipboard Lib "user32" () As Boolean Public Declare Function CloseClipboard Lib "user32" () As Boolean Sub ClearClipboard() ' call ClearClipboard() from your other VBA macro to clear/empty Windows Clipboard If OpenClipboard(0) Then EmptyClipboard CloseClipboard End If End Sub
Both approach will empty the Clipboard, but the first approach will only empty copied data from Excel cells, both values and format. It will not empty Clipboard for any data that belong to application. Using Windows Empty Clipboard function, it will empty Clipboard regardless who is the owner of those data.
Just call one of the two functions above inside your macro, before or after you perform any extensive copy and paste macro to clear your Clipboard. For the 2nd approach, you need to put it in one of your VBA modules first.
Do you have another method to clear/empty Excel Clipboard? Please leave your comments below. Thanks.
Pingback: more info
Pingback: hydraulic fracturing shale gas
Pingback: bad credit mobile phones
Pingback: needs
Pingback: cleaning services sydney
Pingback: alcockandassociates
Pingback: accident lawyer car pearblossom ca
Pingback: http://www.sacochehomme.org/
Pingback: self publishing children s books
Pingback: go
Pingback: hand held credit card machine
Pingback: 1000 poker chips
Pingback: official link
Pingback: check this out
Pingback: bowmel chrysler duncan bc
Pingback: hip dysplasia in older dogs
Pingback: complete life drawing course
Pingback: plumber
Pingback: chasuble
Pingback: web design brisbane
Pingback: Creation Site Internet Annecy
Pingback: Juegos online de futbol gratis
Pingback: vitamins
Pingback: property documents
Pingback: become a chef
Pingback: Electronics
Pingback: signup scrapebox list
Pingback: Drug Recall
Pingback: purchase here
Pingback: beat maker
Pingback: Immobilier Concarneau
Pingback: want to start a business
Pingback: "EcologicalSurfactants
Pingback: freshrankings com program
Pingback: graphic design
Pingback: casque bluetooth
Pingback: life coach austin
Pingback: insurance policy terms
Pingback: promoting and celebrating Virginia creativity
Pingback: remote system backup
Pingback: Zithromax Drug Risks
Pingback: arraignment hearing