Return to VBA Code Examples

Excel VBA Clear Clipboard

Excel VBA Clear Clipboard

Clearing the clipboard in Excel VBA only requires a single line of code:

 

vba clear clipboard

However, this is different from the standard Windows clipboard.  To clear the Windows clipboard you can use the EmptyClipboard Function.  Copy and paste the code below into a code module and run Sub TestClipboardClear to clear the Windows clipboard.

 

VBA Coding Made Easy

Stop searching for VBA code online. Learn more about AutoMacro - A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users! vba save as


Learn More!