Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel VBA: how to programmatically remove the marching ants after range.copy

Tags:

excel

vba

I don't want to resort to SendKeys "{ESC}"

like image 431
Nick Avatar asked Nov 02 '09 17:11

Nick


People also ask

How do I deselect a range of cells in Excel VBA?

"Application. CutCopyMode" just turns off the Copy feature (when you select a range for copying and then select copy). Some range always has to be selected. So, to unselect the original range, just select another cell/range.

How do I get rid of ants in Excel?

Use of the esc key is one of the more common & works fine here. Also, double-clicking a cell [to go into Enter/Edit mode] should clear them as well, as should just selecting a cell & typing content.


1 Answers

application.cutcopymode = false

like image 174
guitarthrower Avatar answered Oct 05 '22 13:10

guitarthrower