vba courses london - how clear excel clipboard

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

Forum home » Delegate support and help forum » Microsoft VBA Training and help » vba courses london - How to Clear Excel ClipBoard

vba courses london - How to Clear Excel ClipBoard

resolvedResolved · Low Priority · Version Standard

Sejal has attended:
Excel VBA Intro Intermediate course

How to Clear Excel ClipBoard

How do you write VBA code to clear clipboard? E.g. when you are copying and pasting lots of data this can cause you to use up excess memory and sometimes crash Excel as a result. Hence, how can you avoid this?

Edited on Fri 1 Dec 2006, 10:59

RE: How to Clear Excel ClipBoard

The quickest way to clear information from the Excel clipboard is the code line

Application.CutCopyMode = False

If used after every paste it keeps the Clipboard empty.

However you can Bypass the Clipboard by NOT using Copy and Paste. To do this:

Instead of

Sheets("London").Select
Range("H9:H16").Copy
Sheets("Yearly Total").Select
Range("D9").Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False

Use

Sheets("Yearly Total").Range("D9:D16") = Sheets("London").Range("H9:H16").Value

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

VBA tip:

Stop Display Alerts In Excel

When creating or deleting a Worksheet in Excel you don't want Excel to inform you "A file already exists....." Or "Do you want to save this file...".

To stop these alerts happening use the following line of code:

Application.DisplayAlerts = False

After the Create or Delete routine use:

Application.DisplayAlerts = True

View all VBA hints and tips


Server loaded in 0.08 secs.